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

◆ ReadContentAsBinaryAsync()

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

Definition at line 12891 of file XmlTextReaderImpl.cs.

12892 {
12893 if (_incReadState == IncrementalReadState.ReadContentAsBinary_End)
12894 {
12895 return 0;
12896 }
12898 ParsingFunction tmp;
12899 while (true)
12900 {
12901 int charsRead = 0;
12902 try
12903 {
12905 }
12906 catch (XmlException e)
12907 {
12910 }
12913 {
12915 }
12916 if (_incReadState == IncrementalReadState.ReadContentAsBinary_OnPartialValue)
12917 {
12918 _curNode.SetValue(string.Empty);
12919 bool flag = false;
12920 int num = 0;
12921 int num2 = 0;
12922 while (!_incReadDecoder.IsFull && !flag)
12923 {
12924 int outOrChars = 0;
12927 (num, num2, _, _) = tuple;
12928 _ = tuple.Item3;
12929 flag = tuple.Item4;
12930 try
12931 {
12933 }
12934 catch (XmlException e2)
12935 {
12937 }
12938 num += charsRead;
12939 }
12940 _incReadState = (flag ? IncrementalReadState.ReadContentAsBinary_OnCachedValue : IncrementalReadState.ReadContentAsBinary_OnPartialValue);
12941 _readValueOffset = 0;
12943 {
12944 _curNode.SetValue(_ps.chars, num, num2 - num);
12948 }
12949 }
12954 {
12955 break;
12956 }
12959 }
12961 _incReadState = IncrementalReadState.ReadContentAsBinary_End;
12963 }
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)
int CopyToBinary(IncrementalReadDecoder decoder, int valueOffset)
void SetLineInfo(int lineNo, int linePos)
void AdjustLineInfo(int valueOffset, bool isNormalized, ref LineInfo lineInfo)
static void AdjustLineInfo(char[] chars, int startPos, int endPos, bool isNormalized, ref LineInfo lineInfo)
void ReThrow(Exception e, int lineNo, int linePos)
async Task< bool > MoveToNextContentNodeAsync(bool moveIfOnContentNode)
void SetupReadContentAsBinaryState(ParsingFunction inReadBinaryFunction)
IncrementalReadDecoder _incReadDecoder
IncrementalReadState _incReadState
void Set(int lineNo, int linePos)
Definition LineInfo.cs:15

References System.Xml.XmlTextReaderImpl._curNode, System.Xml.XmlTextReaderImpl._incReadDecoder, System.Xml.XmlTextReaderImpl._incReadLineInfo, System.Xml.XmlTextReaderImpl._incReadState, System.Xml.XmlTextReaderImpl._nextNextParsingFunction, System.Xml.XmlTextReaderImpl._nextParsingFunction, System.Xml.XmlTextReaderImpl._parsingFunction, System.Xml.XmlTextReaderImpl._ps, System.Xml.XmlTextReaderImpl._readValueOffset, System.Xml.XmlTextReaderImpl.AdjustLineInfo(), System.Xml.XmlTextReaderImpl.NodeData.AdjustLineInfo(), System.buffer, System.Xml.XmlTextReaderImpl.ParsingState.chars, System.Threading.Tasks.Task< TResult >.ConfigureAwait(), System.Xml.XmlTextReaderImpl.NodeData.CopyToBinary(), System.count, System.Xml.IncrementalReadDecoder.Decode(), System.Xml.IncrementalReadDecoder.DecodedCount, System.Xml.Dictionary, System.Xml.XmlTextReaderImpl.ParsingState.eolNormalized, System.index, System.Xml.XmlTextReaderImpl.int, System.Xml.IncrementalReadDecoder.IsFull, System.Xml.LineInfo.lineNo, System.Xml.XmlTextReaderImpl.ParsingState.LineNo, System.Xml.XmlTextReaderImpl.NodeData.LineNo, System.Xml.LineInfo.linePos, System.Xml.XmlTextReaderImpl.ParsingState.LinePos, System.Xml.XmlTextReaderImpl.NodeData.LinePos, System.Xml.XmlTextReaderImpl.MoveToNextContentNodeAsync(), System.Xml.XmlTextReaderImpl.ParseTextAsync(), System.Xml.XmlTextReaderImpl.ReThrow(), System.Xml.LineInfo.Set(), System.Xml.XmlTextReaderImpl.NodeData.SetLineInfo(), System.Xml.IncrementalReadDecoder.SetNextOutputBuffer(), System.Xml.XmlTextReaderImpl.SetupReadContentAsBinaryState(), and System.Xml.XmlTextReaderImpl.NodeData.SetValue().

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