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

◆ ReadElementContentAsBinHexAsync()

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

Reimplemented from System.Xml.XmlReader.

Definition at line 782 of file XmlCharCheckingReader.cs.

783 {
784 if (buffer == null)
785 {
786 throw new ArgumentNullException("buffer");
787 }
788 if (count < 0)
789 {
790 throw new ArgumentOutOfRangeException("count");
791 }
792 if (index < 0)
793 {
794 throw new ArgumentOutOfRangeException("index");
795 }
796 if (buffer.Length - index < count)
797 {
798 throw new ArgumentOutOfRangeException("count");
799 }
800 if (ReadState != ReadState.Interactive)
801 {
802 return 0;
803 }
804 if (_state != State.InReadBinary)
805 {
806 if (base.CanReadBinaryContent && !_checkCharacters)
807 {
808 _readBinaryHelper = null;
809 _state = State.InReadBinary;
811 }
812 _readBinaryHelper = ReadContentAsBinaryHelper.CreateOrReset(_readBinaryHelper, this);
813 }
814 else if (_readBinaryHelper == null)
815 {
816 return await base.ReadElementContentAsBinHexAsync(buffer, index, count).ConfigureAwait(continueOnCapturedContext: false);
817 }
818 _state = State.Interactive;
820 _state = State.InReadBinary;
821 return result;
822 }
new ConfiguredTaskAwaitable< TResult > ConfigureAwait(bool continueOnCapturedContext)
Definition Task.cs:226
static ReadContentAsBinaryHelper CreateOrReset(ReadContentAsBinaryHelper helper, XmlReader reader)
async Task< int > ReadElementContentAsBinHexAsync(byte[] buffer, int index, int count)
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.ReadElementContentAsBinHexAsync().