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

◆ SetInput() [1/4]

void System.Xml.XmlBinaryReader.SetInput ( byte[] buffer,
int offset,
int count,
IXmlDictionary dictionary,
XmlDictionaryReaderQuotas quotas,
XmlBinaryReaderSession session,
OnXmlDictionaryReaderClose onClose )
inline

Definition at line 28 of file XmlBinaryReader.cs.

29 {
30 if (buffer == null)
31 {
33 }
34 if (offset < 0)
35 {
36 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("offset", System.SR.ValueMustBeNonNegative));
37 }
38 if (offset > buffer.Length)
39 {
40 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("offset", System.SR.Format(System.SR.OffsetExceedsBufferSize, buffer.Length)));
41 }
42 if (count < 0)
43 {
44 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("count", System.SR.ValueMustBeNonNegative));
45 }
46 if (count > buffer.Length - offset)
47 {
49 }
51 base.BufferReader.SetBuffer(buffer, offset, count, dictionary, session);
52 _buffered = true;
53 }
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string ValueMustBeNonNegative
Definition SR.cs:296
static string SizeExceedsRemainingBufferSpace
Definition SR.cs:324
static string OffsetExceedsBufferSize
Definition SR.cs:322
Definition SR.cs:7
void MoveToInitial(XmlDictionaryReaderQuotas quotas, XmlBinaryReaderSession session, OnXmlDictionaryReaderClose onClose)

References System.Xml.XmlBinaryReader._buffered, System.buffer, System.count, System.dictionary, System.Xml.Dictionary, System.SR.Format(), System.Xml.XmlBinaryReader.MoveToInitial(), System.offset, System.SR.OffsetExceedsBufferSize, System.SR.SizeExceedsRemainingBufferSpace, System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(), System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(), and System.SR.ValueMustBeNonNegative.