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

◆ LoadAsyncInternal()

static async Task< XElement > System.Xml.Linq.XElement.LoadAsyncInternal ( XmlReader reader,
LoadOptions options,
CancellationToken cancellationToken )
inlinestaticprivate

Definition at line 441 of file XElement.cs.

442 {
443 if (await reader.MoveToContentAsync().ConfigureAwait(continueOnCapturedContext: false) != XmlNodeType.Element)
444 {
445 throw new InvalidOperationException(System.SR.Format(System.SR.InvalidOperation_ExpectedNodeType, XmlNodeType.Element, reader.NodeType));
446 }
447 XElement e = new XElement(default(AsyncConstructionSentry));
448 await e.ReadElementFromAsync(reader, options, cancellationToken).ConfigureAwait(continueOnCapturedContext: false);
449 cancellationToken.ThrowIfCancellationRequested();
450 await reader.MoveToContentAsync().ConfigureAwait(continueOnCapturedContext: false);
451 if (!reader.EOF)
452 {
454 }
455 return e;
456 }
static string InvalidOperation_ExpectedNodeType
Definition SR.cs:48
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string InvalidOperation_ExpectedEndOfFile
Definition SR.cs:44
Definition SR.cs:7

References System.Xml.Linq.XElement.XElement(), System.cancellationToken, System.Xml.XmlReader.EOF, System.SR.Format(), System.SR.InvalidOperation_ExpectedEndOfFile, System.SR.InvalidOperation_ExpectedNodeType, System.Xml.XmlReader.MoveToContentAsync(), System.Xml.XmlReader.NodeType, System.options, and System.Xml.Linq.XElement.ReadElementFromAsync().

Referenced by System.Xml.Linq.XElement.LoadAsync().