Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
CustomAttributeHandleCollection.cs
Go to the documentation of this file.
3
5
6public readonly struct CustomAttributeHandleCollection : IReadOnlyCollection<CustomAttributeHandle>, IEnumerable<CustomAttributeHandle>, IEnumerable
7{
8 public struct Enumerator : IEnumerator<CustomAttributeHandle>, IEnumerator, IDisposable
9 {
10 private readonly MetadataReader _reader;
11
12 private readonly int _lastRowId;
13
14 private int _currentRowId;
15
17 {
18 get
19 {
20 if (_reader.CustomAttributeTable.PtrTable != null)
21 {
23 }
25 }
26 }
27
28 object IEnumerator.Current => Current;
29
30 internal Enumerator(MetadataReader reader, int firstRowId, int lastRowId)
31 {
32 _reader = reader;
35 }
36
41
42 public bool MoveNext()
43 {
45 {
46 _currentRowId = 16777216;
47 return false;
48 }
50 return true;
51 }
52
54 {
55 throw new NotSupportedException();
56 }
57
59 {
60 }
61 }
62
63 private readonly MetadataReader _reader;
64
65 private readonly int _firstRowId;
66
67 private readonly int _lastRowId;
68
69 public int Count => _lastRowId - _firstRowId + 1;
70
72 {
73 _reader = reader;
74 _firstRowId = 1;
75 _lastRowId = reader.CustomAttributeTable.NumberOfRows;
76 }
77
79 {
80 _reader = reader;
81 reader.CustomAttributeTable.GetAttributeRange(handle, out _firstRowId, out _lastRowId);
82 }
83
85 {
87 }
88
93
98}
CustomAttributeTableReader CustomAttributeTable
new IEnumerator< T > GetEnumerator()
CustomAttributeHandleCollection(MetadataReader reader, EntityHandle handle)
static CustomAttributeHandle FromRowId(int rowId)