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

Function joinCsPath

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

394
395/** Join a class-level [Route] prefix and an action's path into one normalized `/path`. */
396function joinCsPath(prefix: string, sub: string): string {
397 const parts = [prefix, sub].map((p) => p.replace(/^\/+|\/+$/g, '')).filter(Boolean);
398 return '/' + parts.join('/');
399}
400
401/** Extract last identifier from an expression like `MyService.Handler` or `Handler`. */
402function 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