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

◆ CheckArray()

void System.Xml.XmlBinaryReader.CheckArray ( Array array,
int offset,
int count )
inlineprivate

Definition at line 1358 of file XmlBinaryReader.cs.

1359 {
1360 if (array == null)
1361 {
1362 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("array"));
1363 }
1364 if (offset < 0)
1365 {
1366 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("offset", System.SR.ValueMustBeNonNegative));
1367 }
1368 if (offset > array.Length)
1369 {
1370 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("offset", System.SR.Format(System.SR.OffsetExceedsBufferSize, array.Length)));
1371 }
1372 if (count < 0)
1373 {
1374 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("count", System.SR.ValueMustBeNonNegative));
1375 }
1376 if (count > array.Length - offset)
1377 {
1378 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("count", System.SR.Format(System.SR.SizeExceedsRemainingBufferSpace, array.Length - offset)));
1379 }
1380 }
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

References System.array, System.count, System.SR.Format(), System.offset, System.SR.OffsetExceedsBufferSize, System.SR.SizeExceedsRemainingBufferSpace, System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(), and System.SR.ValueMustBeNonNegative.

Referenced by System.Xml.XmlBinaryReader.ReadArray(), System.Xml.XmlBinaryReader.ReadArray(), System.Xml.XmlBinaryReader.ReadArray(), System.Xml.XmlBinaryReader.ReadArray(), System.Xml.XmlBinaryReader.ReadArray(), System.Xml.XmlBinaryReader.ReadArray(), System.Xml.XmlBinaryReader.ReadArray(), System.Xml.XmlBinaryReader.ReadArray(), System.Xml.XmlBinaryReader.ReadArray(), and System.Xml.XmlBinaryReader.ReadArray().