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

◆ ReadContentAsBinaryAsync()

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

Definition at line 655 of file ReadContentAsBinaryHelper.cs.

656 {
657 if (_isEnd)
658 {
659 Reset();
660 return 0;
661 }
663 do
664 {
666 {
667 while (true)
668 {
670 {
672 _valueOffset += num;
673 }
674 if (_decoder.IsFull)
675 {
676 return _decoder.DecodedCount;
677 }
679 {
680 break;
681 }
682 _valueOffset = 0;
683 }
684 }
685 else
686 {
690 if (_decoder.IsFull)
691 {
692 return _decoder.DecodedCount;
693 }
694 }
695 _valueOffset = 0;
696 }
698 _isEnd = true;
699 return _decoder.DecodedCount;
700 }
new ConfiguredTaskAwaitable< TResult > ConfigureAwait(bool continueOnCapturedContext)
Definition Task.cs:226
int Decode(char[] chars, int startPos, int len)
void SetNextOutputBuffer(Array array, int offset, int len)
async Task< bool > MoveToNextContentNodeAsync(bool moveIfOnContentNode)
virtual Task< int > ReadValueChunkAsync(char[] buffer, int index, int count)
virtual Task< string > GetValueAsync()

References System.Xml.ReadContentAsBinaryHelper._canReadValueChunk, System.Xml.ReadContentAsBinaryHelper._decoder, System.Xml.ReadContentAsBinaryHelper._isEnd, System.Xml.ReadContentAsBinaryHelper._reader, System.Xml.ReadContentAsBinaryHelper._valueChunk, System.Xml.ReadContentAsBinaryHelper._valueChunkLength, System.Xml.ReadContentAsBinaryHelper._valueOffset, System.buffer, System.Threading.Tasks.Task< TResult >.ConfigureAwait(), System.count, System.Xml.IncrementalReadDecoder.Decode(), System.Xml.IncrementalReadDecoder.DecodedCount, System.Xml.Dictionary, System.Xml.XmlReader.GetValueAsync(), System.index, System.Xml.IncrementalReadDecoder.IsFull, System.Xml.ReadContentAsBinaryHelper.MoveToNextContentNodeAsync(), System.Xml.XmlReader.ReadValueChunkAsync(), System.Xml.ReadContentAsBinaryHelper.Reset(), System.Xml.IncrementalReadDecoder.SetNextOutputBuffer(), and System.text.

Referenced by System.Xml.ReadContentAsBinaryHelper.ReadContentAsBase64Async(), System.Xml.ReadContentAsBinaryHelper.ReadContentAsBinHexAsync(), and System.Xml.ReadContentAsBinaryHelper.ReadElementContentAsBinaryAsync().