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

◆ ReadContentAsBase64Async()

async Task< int > System.Xml.ReadContentAsBinaryHelper.ReadContentAsBase64Async ( byte[] buffer,
int index,
int count )
inlinepackage

Definition at line 423 of file ReadContentAsBinaryHelper.cs.

424 {
425 if (buffer == null)
426 {
427 throw new ArgumentNullException("buffer");
428 }
429 if (count < 0)
430 {
431 throw new ArgumentOutOfRangeException("count");
432 }
433 if (index < 0)
434 {
435 throw new ArgumentOutOfRangeException("index");
436 }
437 if (buffer.Length - index < count)
438 {
439 throw new ArgumentOutOfRangeException("count");
440 }
441 switch (_state)
442 {
443 case State.None:
445 {
446 throw _reader.CreateReadContentAsException("ReadContentAsBase64");
447 }
448 if (!(await InitAsync().ConfigureAwait(continueOnCapturedContext: false)))
449 {
450 return 0;
451 }
452 break;
453 case State.InReadContent:
455 {
457 }
458 break;
459 case State.InReadElementContent:
461 default:
462 return 0;
463 }
466 }
static string Xml_MixingBinaryContentMethods
Definition SR.cs:184
Definition SR.cs:7
new ConfiguredTaskAwaitable< TResult > ConfigureAwait(bool continueOnCapturedContext)
Definition Task.cs:226
async Task< int > ReadContentAsBinaryAsync(byte[] buffer, int index, int count)
Exception CreateReadContentAsException(string methodName)
static bool CanReadContentAs(XmlNodeType nodeType)

References System.Xml.ReadContentAsBinaryHelper._base64Decoder, System.Xml.ReadContentAsBinaryHelper._decoder, System.Xml.ReadContentAsBinaryHelper._reader, System.Xml.ReadContentAsBinaryHelper._state, System.buffer, System.Xml.XmlReader.CanReadContentAs(), System.Threading.Tasks.Task< TResult >.ConfigureAwait(), System.count, System.Xml.XmlReader.CreateReadContentAsException(), System.Xml.Dictionary, System.index, System.Xml.ReadContentAsBinaryHelper.InitAsync(), System.Xml.ReadContentAsBinaryHelper.InitBase64Decoder(), System.Xml.ReadContentAsBinaryHelper.ReadContentAsBinaryAsync(), and System.SR.Xml_MixingBinaryContentMethods.

Referenced by System.Xml.XmlCharCheckingReader.ReadContentAsBase64Async(), System.Xml.XmlValidatingReaderImpl.ReadContentAsBase64Async(), and System.Xml.XsdValidatingReader.ReadContentAsBase64Async().