{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "stack": "csharp",
  "description": "C# code-graph rules. Types are the symbols; methods, constructors and properties come from the call analysis. A partial type spread over several files is one type to the call analysis.",
  "comments": {
    "line": ["//"],
    "block": [["/*", "*/"]],
    "string": ["\"\"\"", "\"", "'"],
    "dialect": "csharp"
  },
  "definitionPatterns": [
    {
      "id": "enum",
      "kind": "enum",
      "regex": "\\benum\\s+([A-Z][A-Za-z0-9_]*)"
    },
    {
      "id": "record",
      "kind": "record",
      "regex": "\\brecord\\s+(?:class\\s+|struct\\s+)?([A-Z][A-Za-z0-9_]*)"
    },
    {
      "id": "interface",
      "kind": "interface",
      "regex": "\\binterface\\s+([A-Z][A-Za-z0-9_]*)"
    },
    {
      "id": "struct",
      "kind": "struct",
      "regex": "\\bstruct\\s+([A-Z][A-Za-z0-9_]*)"
    },
    {
      "id": "class",
      "kind": "class",
      "regex": "\\bclass\\s+([A-Z][A-Za-z0-9_]*)"
    }
  ],
  "importPatterns": [
    {
      "id": "using",
      "regex": "^\\s*(?:global\\s+)?using\\s+(?:static\\s+)?(?:[A-Za-z_][A-Za-z0-9_]*\\.)*([A-Za-z_][A-Za-z0-9_]*)\\s*;"
    }
  ],
  "referenceKinds": ["class", "interface", "struct", "enum", "record"],
  "supertypes": {
    "syntax": "colon",
    "kinds": ["class", "interface", "struct", "record"]
  },
  "ignoredIdentifiers": [
    "this",
    "base",
    "class",
    "interface",
    "struct",
    "enum",
    "record",
    "namespace",
    "using",
    "public",
    "private",
    "protected",
    "internal",
    "static",
    "readonly",
    "abstract",
    "virtual",
    "override",
    "sealed",
    "partial",
    "async",
    "await",
    "void",
    "new",
    "return",
    "if",
    "else",
    "for",
    "foreach",
    "while",
    "switch",
    "case",
    "default",
    "try",
    "catch",
    "finally",
    "throw",
    "null",
    "true",
    "false",
    "var",
    "string",
    "object",
    "int",
    "bool",
    "Task",
    "List",
    "Dictionary",
    "IEnumerable",
    "Action",
    "Func"
  ]
}
