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

◆ ReadContentAsBinary()

int System.Xml.XmlTextReaderImpl.ReadContentAsBinary ( byte[] buffer,
int index,
int count )
inlineprivate

Definition at line 8240 of file XmlTextReaderImpl.cs.

8241 {
8242 if (_incReadState == IncrementalReadState.ReadContentAsBinary_End)
8243 {
8244 return 0;
8245 }
8247 ParsingFunction parsingFunction;
8248 while (true)
8249 {
8250 int num = 0;
8251 try
8252 {
8254 }
8255 catch (XmlException e)
8256 {
8259 }
8260 _readValueOffset += num;
8262 {
8264 }
8265 if (_incReadState == IncrementalReadState.ReadContentAsBinary_OnPartialValue)
8266 {
8267 _curNode.SetValue(string.Empty);
8268 bool flag = false;
8269 int startPos = 0;
8270 int endPos = 0;
8271 while (!_incReadDecoder.IsFull && !flag)
8272 {
8273 int outOrChars = 0;
8275 flag = ParseText(out startPos, out endPos, ref outOrChars);
8276 try
8277 {
8279 }
8280 catch (XmlException e2)
8281 {
8283 }
8284 startPos += num;
8285 }
8286 _incReadState = (flag ? IncrementalReadState.ReadContentAsBinary_OnCachedValue : IncrementalReadState.ReadContentAsBinary_OnPartialValue);
8287 _readValueOffset = 0;
8289 {
8294 }
8295 }
8300 {
8301 break;
8302 }
8305 }
8307 _incReadState = IncrementalReadState.ReadContentAsBinary_End;
8309 }
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)
bool MoveToNextContentNode(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.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.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.MoveToNextContentNode(), System.Xml.XmlTextReaderImpl.ParseText(), 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(), System.Xml.XmlTextReaderImpl.ReadContentAsBinHex(), and System.Xml.XmlTextReaderImpl.ReadElementContentAsBinary().