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

◆ CheckArray()

void System.Xml.XmlDictionaryReader.CheckArray ( Array array,
int offset,
int count )
inlineprivateinherited

Definition at line 1372 of file XmlDictionaryReader.cs.

1373 {
1374 if (array == null)
1375 {
1376 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("array"));
1377 }
1378 if (offset < 0)
1379 {
1380 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("offset", System.SR.ValueMustBeNonNegative));
1381 }
1382 if (offset > array.Length)
1383 {
1384 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("offset", System.SR.Format(System.SR.OffsetExceedsBufferSize, array.Length)));
1385 }
1386 if (count < 0)
1387 {
1388 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("count", System.SR.ValueMustBeNonNegative));
1389 }
1390 if (count > array.Length - offset)
1391 {
1392 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("count", System.SR.Format(System.SR.SizeExceedsRemainingBufferSpace, array.Length - offset)));
1393 }
1394 }
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.XmlDictionaryReader.ReadArray(), System.Xml.XmlDictionaryReader.ReadArray(), System.Xml.XmlDictionaryReader.ReadArray(), System.Xml.XmlDictionaryReader.ReadArray(), System.Xml.XmlDictionaryReader.ReadArray(), System.Xml.XmlDictionaryReader.ReadArray(), System.Xml.XmlDictionaryReader.ReadArray(), System.Xml.XmlDictionaryReader.ReadArray(), System.Xml.XmlDictionaryReader.ReadArray(), and System.Xml.XmlDictionaryReader.ReadArray().