MCPcopy Index your code
hub / github.com/github/copilot-sdk / xmlDocNamedElement

Function xmlDocNamedElement

scripts/codegen/csharp.ts:124–143  ·  view source on GitHub ↗
(
    tagName: string,
    name: string,
    description: string | undefined,
    indent: string,
    escapeDescription = true
)

Source from the content-addressed store, hash-verified

122}
123
124function xmlDocNamedElement(
125 tagName: string,
126 name: string,
127 description: string | undefined,
128 indent: string,
129 escapeDescription = true
130): string[] {
131 if (!description) return [];
132 const preparedDescription = escapeDescription ? escapeXml(description.trim()) : description.trim();
133 const lines = ensureTrailingPunctuation(preparedDescription).split(/\r?\n/);
134 const escapedName = escapeXmlAttribute(name);
135 if (lines.length === 1) {
136 return [`${indent}/// <${tagName} name="${escapedName}">${lines[0]}</${tagName}>`];
137 }
138 return [
139 `${indent}/// <${tagName} name="${escapedName}">`,
140 ...lines.map((line) => `${indent}/// ${line}`),
141 `${indent}/// </${tagName}>`,
142 ];
143}
144
145function rpcResultDescription(method: RpcMethod, resultSchema: JSONSchema7 | undefined): string | undefined {
146 if (isVoidSchema(resultSchema)) return undefined;

Callers 1

pushRpcMethodXmlDocsFunction · 0.85

Calls 3

escapeXmlFunction · 0.85
escapeXmlAttributeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…