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

◆ ReadElementContentAsBinHexAsync()

async Task< int > System.Xml.ReadContentAsBinaryHelper.ReadElementContentAsBinHexAsync ( byte[] buffer,
int index,
int count )
inlinepackage

Definition at line 558 of file ReadContentAsBinaryHelper.cs.

559 {
560 if (buffer == null)
561 {
562 throw new ArgumentNullException("buffer");
563 }
564 if (count < 0)
565 {
566 throw new ArgumentOutOfRangeException("count");
567 }
568 if (index < 0)
569 {
570 throw new ArgumentOutOfRangeException("index");
571 }
572 if (buffer.Length - index < count)
573 {
574 throw new ArgumentOutOfRangeException("count");
575 }
576 switch (_state)
577 {
578 case State.None:
579 if (_reader.NodeType != XmlNodeType.Element)
580 {
581 throw _reader.CreateReadElementContentAsException("ReadElementContentAsBinHex");
582 }
584 {
585 return 0;
586 }
587 break;
588 case State.InReadContent:
590 case State.InReadElementContent:
592 {
594 }
595 break;
596 default:
597 return 0;
598 }
601 }
static string Xml_MixingBinaryContentMethods
Definition SR.cs:184
Definition SR.cs:7
new ConfiguredTaskAwaitable< TResult > ConfigureAwait(bool continueOnCapturedContext)
Definition Task.cs:226
async Task< int > ReadElementContentAsBinaryAsync(byte[] buffer, int index, int count)
Exception CreateReadElementContentAsException(string methodName)
XmlNodeType NodeType
Definition XmlReader.cs:62

References System.Xml.ReadContentAsBinaryHelper._binHexDecoder, System.Xml.ReadContentAsBinaryHelper._decoder, System.Xml.ReadContentAsBinaryHelper._reader, System.Xml.ReadContentAsBinaryHelper._state, System.buffer, System.Threading.Tasks.Task< TResult >.ConfigureAwait(), System.count, System.Xml.XmlReader.CreateReadElementContentAsException(), System.Xml.Dictionary, System.index, System.Xml.ReadContentAsBinaryHelper.InitBinHexDecoder(), System.Xml.ReadContentAsBinaryHelper.InitOnElementAsync(), System.Xml.XmlReader.NodeType, System.Xml.ReadContentAsBinaryHelper.ReadElementContentAsBinaryAsync(), and System.SR.Xml_MixingBinaryContentMethods.

Referenced by System.Xml.XmlCharCheckingReader.ReadElementContentAsBinHexAsync(), System.Xml.XmlValidatingReaderImpl.ReadElementContentAsBinHexAsync(), and System.Xml.XsdValidatingReader.ReadElementContentAsBinHexAsync().