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

◆ SaveAsync() [2/3]

async Task System.Xml.Linq.XDocument.SaveAsync ( TextWriter textWriter,
SaveOptions options,
CancellationToken cancellationToken )
inline

Definition at line 273 of file XDocument.cs.

274 {
275 XmlWriterSettings xmlWriterSettings = XNode.GetXmlWriterSettings(options);
277 XmlWriter w = XmlWriter.Create(textWriter, xmlWriterSettings);
279 try
280 {
282 await w.FlushAsync().ConfigureAwait(continueOnCapturedContext: false);
283 }
284 finally
285 {
286 IAsyncDisposable asyncDisposable = configuredAsyncDisposable as IAsyncDisposable;
287 if (asyncDisposable != null)
288 {
289 await asyncDisposable.DisposeAsync();
290 }
291 }
292 }
new ConfiguredTaskAwaitable< TResult > ConfigureAwait(bool continueOnCapturedContext)
Definition Task.cs:226
override Task WriteToAsync(XmlWriter writer, CancellationToken cancellationToken)
Definition XDocument.cs:343

References System.cancellationToken, System.Threading.Tasks.Task< TResult >.ConfigureAwait(), System.Xml.XmlWriter.Create(), System.Xml.Dictionary, System.IAsyncDisposable.DisposeAsync(), System.Xml.Linq.XNode.GetXmlWriterSettings(), System.options, and System.Xml.Linq.XDocument.WriteToAsync().