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

◆ Queue() [3/4]

System.Collections.Queue.Queue ( int capacity,
float growFactor )
inline

Definition at line 246 of file Queue.cs.

247 {
248 if (capacity < 0)
249 {
250 throw new ArgumentOutOfRangeException("capacity", System.SR.ArgumentOutOfRange_NeedNonNegNum);
251 }
252 if (!((double)growFactor >= 1.0) || !((double)growFactor <= 10.0))
253 {
254 throw new ArgumentOutOfRangeException("growFactor", System.SR.Format(System.SR.ArgumentOutOfRange_QueueGrowFactor, 1, 10));
255 }
256 _array = new object[capacity];
257 _head = 0;
258 _tail = 0;
259 _size = 0;
260 _growFactor = (int)(growFactor * 100f);
261 }
readonly int _growFactor
Definition Queue.cs:226
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string ArgumentOutOfRange_QueueGrowFactor
Definition SR.cs:36
static string ArgumentOutOfRange_NeedNonNegNum
Definition SR.cs:32
Definition SR.cs:7

References System.Collections.Queue._array, System.Collections.Queue._growFactor, System.Collections.Queue._head, System.Collections.Queue._size, System.Collections.Queue._tail, System.SR.ArgumentOutOfRange_NeedNonNegNum, System.SR.ArgumentOutOfRange_QueueGrowFactor, System.capacity, and System.SR.Format().