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

◆ ReadElementContentAsBase64Async()

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

Definition at line 513 of file ReadContentAsBinaryHelper.cs.

514 {
515 if (buffer == null)
516 {
517 throw new ArgumentNullException("buffer");
518 }
519 if (count < 0)
520 {
521 throw new ArgumentOutOfRangeException("count");
522 }
523 if (index < 0)
524 {
525 throw new ArgumentOutOfRangeException("index");
526 }
527 if (buffer.Length - index < count)
528 {
529 throw new ArgumentOutOfRangeException("count");
530 }
531 switch (_state)
532 {
533 case State.None:
534 if (_reader.NodeType != XmlNodeType.Element)
535 {
536 throw _reader.CreateReadElementContentAsException("ReadElementContentAsBase64");
537 }
539 {
540 return 0;
541 }
542 break;
543 case State.InReadContent:
545 case State.InReadElementContent:
547 {
549 }
550 break;
551 default:
552 return 0;
553 }
556 }
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._base64Decoder, 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.InitBase64Decoder(), System.Xml.ReadContentAsBinaryHelper.InitOnElementAsync(), System.Xml.XmlReader.NodeType, System.Xml.ReadContentAsBinaryHelper.ReadElementContentAsBinaryAsync(), and System.SR.Xml_MixingBinaryContentMethods.

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