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

◆ SetInput() [1/4]

void System.Runtime.Serialization.Json.XmlJsonReader.SetInput ( byte[] buffer,
int offset,
int count,
Encoding encoding,
XmlDictionaryReaderQuotas quotas,
OnXmlDictionaryReaderClose onClose )
inline

Definition at line 549 of file XmlJsonReader.cs.

550 {
551 if (buffer == null)
552 {
553 throw new ArgumentNullException("buffer");
554 }
555 if (offset < 0)
556 {
557 throw new ArgumentOutOfRangeException("offset", System.SR.ValueMustBeNonNegative);
558 }
559 if (offset > buffer.Length)
560 {
561 throw new ArgumentOutOfRangeException("offset", System.SR.Format(System.SR.JsonOffsetExceedsBufferSize, buffer.Length));
562 }
563 if (count < 0)
564 {
565 throw new ArgumentOutOfRangeException("count", System.SR.ValueMustBeNonNegative);
566 }
567 if (count > buffer.Length - offset)
568 {
569 throw new ArgumentOutOfRangeException("count", System.SR.Format(System.SR.JsonSizeExceedsRemainingBufferSpace, buffer.Length - offset));
570 }
572 ArraySegment<byte> arraySegment = JsonEncodingStreamWrapper.ProcessBuffer(buffer, offset, count, encoding);
573 base.BufferReader.SetBuffer(arraySegment.Array, arraySegment.Offset, arraySegment.Count, null, null);
574 _buffered = true;
575 ResetState();
576 }
void MoveToInitial(XmlDictionaryReaderQuotas quotas, OnXmlDictionaryReaderClose onClose)
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string JsonSizeExceedsRemainingBufferSpace
Definition SR.cs:544
static string ValueMustBeNonNegative
Definition SR.cs:296
static string JsonOffsetExceedsBufferSize
Definition SR.cs:542
Definition SR.cs:7

References System.Runtime.Serialization.Json.XmlJsonReader._buffered, System.buffer, System.count, System.Runtime.Serialization.Dictionary, System.SR.Format(), System.SR.JsonOffsetExceedsBufferSize, System.SR.JsonSizeExceedsRemainingBufferSpace, System.Runtime.Serialization.Json.XmlJsonReader.MoveToInitial(), System.offset, System.Runtime.Serialization.Json.JsonEncodingStreamWrapper.ProcessBuffer(), System.Runtime.Serialization.Json.XmlJsonReader.ResetState(), and System.SR.ValueMustBeNonNegative.