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

◆ CalculateHeapSizes()

static ImmutableArray< ImmutableArray< int > > System.Reflection.Metadata.Ecma335.MetadataAggregator.CalculateHeapSizes ( IReadOnlyList< int > baseSizes,
IReadOnlyList< MetadataReader > deltaReaders )
inlinestaticprivate

Definition at line 105 of file MetadataAggregator.cs.

106 {
107 int num = 1 + deltaReaders.Count;
108 int[] array = new int[num];
109 int[] array2 = new int[num];
110 int[] array3 = new int[num];
111 int[] array4 = new int[num];
112 array[0] = baseSizes[0];
113 array2[0] = baseSizes[1];
114 array3[0] = baseSizes[2];
115 array4[0] = baseSizes[3] / 16;
116 for (int i = 0; i < deltaReaders.Count; i++)
117 {
118 array[i + 1] = array[i] + deltaReaders[i].GetHeapSize(HeapIndex.UserString);
119 array2[i + 1] = array2[i] + deltaReaders[i].GetHeapSize(HeapIndex.String);
120 array3[i + 1] = array3[i] + deltaReaders[i].GetHeapSize(HeapIndex.Blob);
121 array4[i + 1] = array4[i] + deltaReaders[i].GetHeapSize(HeapIndex.Guid) / 16;
122 }
123 return ImmutableArray.Create(array.ToImmutableArray(), array2.ToImmutableArray(), array3.ToImmutableArray(), array4.ToImmutableArray());
124 }

References System.array, and System.Collections.Generic.Dictionary< TKey, TValue >.Count.

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