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

◆ ReadElementContentAsBase64()

int System.Xml.ReadContentAsBinaryHelper.ReadElementContentAsBase64 ( byte[] buffer,
int index,
int count )
inlinepackage

Definition at line 144 of file ReadContentAsBinaryHelper.cs.

145 {
146 if (buffer == null)
147 {
148 throw new ArgumentNullException("buffer");
149 }
150 if (count < 0)
151 {
152 throw new ArgumentOutOfRangeException("count");
153 }
154 if (index < 0)
155 {
156 throw new ArgumentOutOfRangeException("index");
157 }
158 if (buffer.Length - index < count)
159 {
160 throw new ArgumentOutOfRangeException("count");
161 }
162 switch (_state)
163 {
164 case State.None:
165 if (_reader.NodeType != XmlNodeType.Element)
166 {
167 throw _reader.CreateReadElementContentAsException("ReadElementContentAsBase64");
168 }
169 if (!InitOnElement())
170 {
171 return 0;
172 }
173 break;
174 case State.InReadContent:
176 case State.InReadElementContent:
178 {
180 }
181 break;
182 default:
183 return 0;
184 }
187 }
static string Xml_MixingBinaryContentMethods
Definition SR.cs:184
Definition SR.cs:7
int ReadElementContentAsBinary(byte[] buffer, int index, int count)
Exception CreateReadElementContentAsException(string methodName)
XmlNodeType NodeType
Definition XmlReader.cs:62

References System.Xml.ReadContentAsBinaryHelper._base64Decoder, System.Xml.ReadContentAsBinaryHelper._decoder, System.Xml.ReadContentAsBinaryHelper._reader, System.Xml.ReadContentAsBinaryHelper._state, System.buffer, System.count, System.Xml.XmlReader.CreateReadElementContentAsException(), System.index, System.Xml.ReadContentAsBinaryHelper.InitBase64Decoder(), System.Xml.ReadContentAsBinaryHelper.InitOnElement(), System.Xml.XmlReader.NodeType, System.Xml.ReadContentAsBinaryHelper.ReadElementContentAsBinary(), and System.SR.Xml_MixingBinaryContentMethods.

Referenced by System.Xml.XPath.XPathNavigatorReader.ReadElementContentAsBase64(), System.Xml.XmlCharCheckingReader.ReadElementContentAsBase64(), System.Xml.XmlNodeReader.ReadElementContentAsBase64(), System.Xml.XmlValidatingReaderImpl.ReadElementContentAsBase64(), and System.Xml.XsdValidatingReader.ReadElementContentAsBase64().