MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / joinCsPath

Function joinCsPath

src/resolution/frameworks/csharp.ts:443–446  ·  view source on GitHub ↗

Join a class-level [Route] prefix and an action's path into one normalized `/path`.

(prefix: string, sub: string)

Source from the content-addressed store, hash-verified

441
442/** Join a class-level [Route] prefix and an action's path into one normalized `/path`. */
443function joinCsPath(prefix: string, sub: string): string {
444 const parts = [prefix, sub].map((p) => p.replace(/^\/+|\/+$/g, '')).filter(Boolean);
445 return '/' + parts.join('/');
446}
447
448/** Extract last identifier from an expression like `MyService.Handler` or `Handler`. */
449function extractCSharpTailIdent(expr: string): string | null {

Callers 3

extractFunction · 0.85
endpointGroupRoutesFunction · 0.85

Calls 2

mapMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected