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

◆ ReadElementContentAsBase64Async()

override async Task< int > System.Xml.XmlCharCheckingReader.ReadElementContentAsBase64Async ( byte[] buffer,
int index,
int count )
inlinevirtual

Reimplemented from System.Xml.XmlReader.

Definition at line 740 of file XmlCharCheckingReader.cs.

741 {
742 if (buffer == null)
743 {
744 throw new ArgumentNullException("buffer");
745 }
746 if (count < 0)
747 {
748 throw new ArgumentOutOfRangeException("count");
749 }
750 if (index < 0)
751 {
752 throw new ArgumentOutOfRangeException("index");
753 }
754 if (buffer.Length - index < count)
755 {
756 throw new ArgumentOutOfRangeException("count");
757 }
758 if (ReadState != ReadState.Interactive)
759 {
760 return 0;
761 }
762 if (_state != State.InReadBinary)
763 {
764 if (base.CanReadBinaryContent && !_checkCharacters)
765 {
766 _readBinaryHelper = null;
767 _state = State.InReadBinary;
769 }
770 _readBinaryHelper = ReadContentAsBinaryHelper.CreateOrReset(_readBinaryHelper, this);
771 }
772 else if (_readBinaryHelper == null)
773 {
774 return await base.ReadElementContentAsBase64Async(buffer, index, count).ConfigureAwait(continueOnCapturedContext: false);
775 }
776 _state = State.Interactive;
778 _state = State.InReadBinary;
779 return result;
780 }
new ConfiguredTaskAwaitable< TResult > ConfigureAwait(bool continueOnCapturedContext)
Definition Task.cs:226
async Task< int > ReadElementContentAsBase64Async(byte[] buffer, int index, int count)
static ReadContentAsBinaryHelper CreateOrReset(ReadContentAsBinaryHelper helper, XmlReader reader)
ReadContentAsBinaryHelper _readBinaryHelper

References System.Xml.XmlCharCheckingReader._checkCharacters, System.Xml.XmlCharCheckingReader._readBinaryHelper, System.Xml.XmlCharCheckingReader._state, System.buffer, System.Threading.Tasks.Task< TResult >.ConfigureAwait(), System.count, System.Xml.ReadContentAsBinaryHelper.CreateOrReset(), System.Xml.Dictionary, System.index, and System.Xml.ReadContentAsBinaryHelper.ReadElementContentAsBase64Async().