Extract last identifier from an expression like `MyService.Handler` or `Handler`.
(expr: string)
| 400 | |
| 401 | /** Extract last identifier from an expression like `MyService.Handler` or `Handler`. */ |
| 402 | function extractCSharpTailIdent(expr: string): string | null { |
| 403 | const cleaned = expr.trim().replace(/\s+/g, ''); |
| 404 | const m = cleaned.match(/(?:\.|^)([A-Za-z_][A-Za-z0-9_]*)$/); |
| 405 | return m ? m[1]! : null; |
| 406 | } |
| 407 | |
| 408 | // Directory patterns |
| 409 | const CONTROLLER_DIRS = ['/Controllers/']; |