Terraria v1.4.4.9
Terraria source code documentation
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros

◆ ValidateTypeSystemRowCounts()

static void System.Reflection.Metadata.Ecma335.PortablePdbBuilder.ValidateTypeSystemRowCounts ( ImmutableArray< int > typeSystemRowCounts)
inlinestaticprivate

Definition at line 35 of file PortablePdbBuilder.cs.

36 {
37 if (typeSystemRowCounts.IsDefault)
38 {
39 Throw.ArgumentNull("typeSystemRowCounts");
40 }
41 if (typeSystemRowCounts.Length != MetadataTokens.TableCount)
42 {
43 throw new ArgumentException(System.SR.Format(System.SR.ExpectedArrayOfSize, MetadataTokens.TableCount), "typeSystemRowCounts");
44 }
45 for (int i = 0; i < typeSystemRowCounts.Length; i++)
46 {
47 if (typeSystemRowCounts[i] != 0)
48 {
49 if (((uint)typeSystemRowCounts[i] & 0xFF000000u) != 0)
50 {
51 throw new ArgumentOutOfRangeException("typeSystemRowCounts", System.SR.Format(System.SR.RowCountOutOfRange, i));
52 }
53 if (((1L << i) & 0x1FC93FB7FF57L) == 0L)
54 {
55 throw new ArgumentException(System.SR.Format(System.SR.RowCountMustBeZero, i), "typeSystemRowCounts");
56 }
57 }
58 }
59 }
static string RowCountOutOfRange
Definition SR.cs:226
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string RowCountMustBeZero
Definition SR.cs:224
static string ExpectedArrayOfSize
Definition SR.cs:200
Definition SR.cs:7

References System.Reflection.Throw.ArgumentNull(), System.SR.ExpectedArrayOfSize, System.SR.Format(), System.L, System.SR.RowCountMustBeZero, System.SR.RowCountOutOfRange, and System.Reflection.Metadata.Ecma335.MetadataTokens.TableCount.

Referenced by System.Reflection.Metadata.Ecma335.PortablePdbBuilder.PortablePdbBuilder().