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

◆ ReadContentAsBinHexAsync()

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

Definition at line 468 of file ReadContentAsBinaryHelper.cs.

469 {
470 if (buffer == null)
471 {
472 throw new ArgumentNullException("buffer");
473 }
474 if (count < 0)
475 {
476 throw new ArgumentOutOfRangeException("count");
477 }
478 if (index < 0)
479 {
480 throw new ArgumentOutOfRangeException("index");
481 }
482 if (buffer.Length - index < count)
483 {
484 throw new ArgumentOutOfRangeException("count");
485 }
486 switch (_state)
487 {
488 case State.None:
490 {
491 throw _reader.CreateReadContentAsException("ReadContentAsBinHex");
492 }
493 if (!(await InitAsync().ConfigureAwait(continueOnCapturedContext: false)))
494 {
495 return 0;
496 }
497 break;
498 case State.InReadContent:
500 {
502 }
503 break;
504 case State.InReadElementContent:
506 default:
507 return 0;
508 }
511 }
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 > ReadContentAsBinaryAsync(byte[] buffer, int index, int count)
Exception CreateReadContentAsException(string methodName)
static bool CanReadContentAs(XmlNodeType nodeType)

References System.Xml.ReadContentAsBinaryHelper._binHexDecoder, System.Xml.ReadContentAsBinaryHelper._decoder, System.Xml.ReadContentAsBinaryHelper._reader, System.Xml.ReadContentAsBinaryHelper._state, System.buffer, System.Xml.XmlReader.CanReadContentAs(), System.Threading.Tasks.Task< TResult >.ConfigureAwait(), System.count, System.Xml.XmlReader.CreateReadContentAsException(), System.Xml.Dictionary, System.index, System.Xml.ReadContentAsBinaryHelper.InitAsync(), System.Xml.ReadContentAsBinaryHelper.InitBinHexDecoder(), System.Xml.ReadContentAsBinaryHelper.ReadContentAsBinaryAsync(), and System.SR.Xml_MixingBinaryContentMethods.

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