Extract last identifier from an expression like `MyService.Handler` or `Handler`.
(expr: string)
| 446 | |
| 447 | /** Extract last identifier from an expression like `MyService.Handler` or `Handler`. */ |
| 448 | function extractCSharpTailIdent(expr: string): string | null { |
| 449 | const cleaned = expr.trim().replace(/\s+/g, ''); |
| 450 | const m = cleaned.match(/(?:\.|^)([A-Za-z_][A-Za-z0-9_]*)$/); |
| 451 | return m ? m[1]! : null; |
| 452 | } |
| 453 | |
| 454 | // Directory patterns |
| 455 | const CONTROLLER_DIRS = ['/Controllers/']; |