Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ WriteContentToAsync()

async Task System.Xml.Linq.XContainer.WriteContentToAsync ( XmlWriter writer,
CancellationToken cancellationToken )
inlinepackageinherited

Definition at line 1358 of file XContainer.cs.

1359 {
1360 if (content == null)
1361 {
1362 return;
1363 }
1364 if (content is string text)
1365 {
1366 cancellationToken.ThrowIfCancellationRequested();
1367 Task task = ((!(this is XDocument)) ? writer.WriteStringAsync(text) : writer.WriteWhitespaceAsync(text));
1368 await task.ConfigureAwait(continueOnCapturedContext: false);
1369 return;
1370 }
1371 XNode i = (XNode)content;
1372 do
1373 {
1374 i = i.next;
1375 await i.WriteToAsync(writer, cancellationToken).ConfigureAwait(continueOnCapturedContext: false);
1376 }
1377 while (i != content);
1378 }

References System.Xml.Linq.XNode.XNode(), System.cancellationToken, System.Xml.Linq.XContainer.content, System.task, System.text, and System.writer.

Referenced by System.Xml.Linq.XDocument.WriteToAsyncInternal().