Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
AsnEncodedDataCollection.cs
Go to the documentation of this file.
3
5
7{
8 private readonly List<AsnEncodedData> _list;
9
10 public AsnEncodedData this[int index] => _list[index];
11
12 public int Count => _list.Count;
13
14 public bool IsSynchronized => false;
15
16 public object SyncRoot => this;
17
19 {
21 }
22
28
30 {
31 if (asnEncodedData == null)
32 {
33 throw new ArgumentNullException("asnEncodedData");
34 }
35 int count = _list.Count;
37 return count;
38 }
39
41 {
42 if (asnEncodedData == null)
43 {
44 throw new ArgumentNullException("asnEncodedData");
45 }
47 }
48
50 {
51 return new AsnEncodedDataEnumerator(this);
52 }
53
58
60 {
61 if (array == null)
62 {
63 throw new ArgumentNullException("array");
64 }
65 if (array.Rank != 1)
66 {
68 }
69 if (index < 0 || index >= array.Length)
70 {
72 }
73 if (Count > array.Length - index)
74 {
76 }
77 for (int i = 0; i < Count; i++)
78 {
79 array.SetValue(this[i], index);
80 index++;
81 }
82 }
83
84 public void CopyTo(AsnEncodedData[] array, int index)
85 {
86 if (array == null)
87 {
88 throw new ArgumentNullException("array");
89 }
90 if (index < 0 || index >= array.Length)
91 {
93 }
95 }
96}
bool ICollection< KeyValuePair< TKey, TValue > >. Remove(KeyValuePair< TKey, TValue > keyValuePair)
void CopyTo(KeyValuePair< TKey, TValue >[] array, int index)
void Add(TKey key, TValue value)
static string ArgumentOutOfRange_Index
Definition SR.cs:30
static string Arg_RankMultiDimNotSupported
Definition SR.cs:18
static string Argument_InvalidOffLen
Definition SR.cs:22
Definition SR.cs:7
void CopyTo(T[] array, int arrayIndex)
new IEnumerator< T > GetEnumerator()