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

Function joinCsPath

src/resolution/frameworks/csharp.ts:442–445  ·  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

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