Kind: Class
Source: atloria-monorepo/libs/parser-core/src/parsers/backend/dotnet.parser.ts
.NET Parser implementation using Roslyn bridge
Implements: IParser
Methods
| Method | Signature | Returns |
|---|---|---|
initialize | initialize(_config: ParserConfig) | Promise<void> |
canParse | canParse(filePath: string) | boolean |
parseFile | parseFile(filePath: string, content: string) | Promise<ParseResult> |
parseFiles | parseFiles(files: ParseFileInput[]) | Promise<ParseResult[]> |
parseProject | parseProject(rootDir: string) | Promise<ParseResult> |
destroy | destroy() | Promise<void> |
Properties
| Property | Type |
|---|---|
name | any |
version | any |
supportedPatterns | any |
Where it refuses work
DotNetParserstops the work withErrorwhen!this.roslynBridgePath— “Roslyn bridge path not initialized”.DotNetParserstops the work with an early return when/\.sln$/.test(filePath).DotNetParserstops the work with an early return when/\.csproj$/.test(filePath) || /\.vbproj$/.test(filePath).DotNetParserstops the work with an early return when/appsettings.*\.json$/.test(filePath).DotNetParserstops the work with an early return when/web\.config$/.test(filePath) || /app\.config$/.test(filePath).DotNetParserstops the work with an early return when!result || !result.entities?.length.
When something fails
DotNetParserhandles failure in 8 places: it logs it and continues in 5, turns it into a return value in 2, and discards it silently in 1. A failure discarded silently leaves no trace for whoever debugs this later.
Was this page helpful?