ListPoolScope<T>¶
Namespace:
SideXP.Core| Inherits from:IDisposable,IList<T>
Gets the instance of a list from ListPool<T>, and release it whenever it's no more used. string[] letters = null; using (var scope = new ListPoolScope{string}()) { scope.List.Add("A"); scope.List.Add("B"); scope.List.Add("C"); letters = scope.List.ToArray(); } UnityEngine.Debug.Log(string.Join(", ", letters));
Type parameters
T: The type of the elements of the list.
Constructors¶
ListPoolScope()¶
Gets the instance of a list from ListPool<T>, and release it whenever it's no more used. string[] letters = null; using (var scope = new ListPoolScope{string}()) { scope.List.Add("A"); scope.List.Add("B"); scope.List.Add("C"); letters = scope.List.ToArray(); } UnityEngine.Debug.Log(string.Join(", ", letters));
ListPoolScope(IEnumerable<T>)¶
Gets the instance of a list from ListPool<T>, and release it whenever it's no more used. string[] letters = null; using (var scope = new ListPoolScope{string}()) { scope.List.Add("A"); scope.List.Add("B"); scope.List.Add("C"); letters = scope.List.ToArray(); } UnityEngine.Debug.Log(string.Join(", ", letters));
Parameters
collection: The initial items in the list
ListPoolScope(int)¶
Gets the instance of a list from ListPool<T>, and release it whenever it's no more used. string[] letters = null; using (var scope = new ListPoolScope{string}()) { scope.List.Add("A"); scope.List.Add("B"); scope.List.Add("C"); letters = scope.List.ToArray(); } UnityEngine.Debug.Log(string.Join(", ", letters));
Parameters
capacity: The initial capacity of the list
Properties¶
List¶
The recycled or created instance of the list.
this[int]¶
Inherited documentation.
Count¶
Inherited documentation.
Capacity¶
Inherited documentation.
IsReadOnly¶
Inherited documentation.
Methods¶
Dispose()¶
Inherited documentation.
Add(T)¶
Inherited documentation.
AddRange(IEnumerable<T>)¶
Inherited documentation.
AsReadOnly()¶
Inherited documentation.
BinarySearch(int, int, T, IComparer<T>)¶
Inherited documentation.
BinarySearch(T)¶
Inherited documentation.
BinarySearch(T, IComparer<T>)¶
Inherited documentation.
Clear()¶
Inherited documentation.
Contains(T)¶
Inherited documentation.
ConvertAll<TOutput>(Converter<T, TOutput>)¶
Inherited documentation.
CopyTo(T[], int)¶
Inherited documentation.
CopyTo(T[])¶
Inherited documentation.
CopyTo(int, T[], int, int)¶
Inherited documentation.
CopyTo(Array, int)¶
Inherited documentation.
Exists(Predicate<T>)¶
Inherited documentation.
Find(Predicate<T>)¶
Inherited documentation.
FindAll(Predicate<T>)¶
Inherited documentation.
FindIndex(int, int, Predicate<T>)¶
Inherited documentation.
FindIndex(int, Predicate<T>)¶
Inherited documentation.
FindIndex(Predicate<T>)¶
Inherited documentation.
FindLast(Predicate<T>)¶
Inherited documentation.
FindLastIndex(int, int, Predicate<T>)¶
Inherited documentation.
FindLastIndex(int, Predicate<T>)¶
Inherited documentation.
FindLastIndex(Predicate<T>)¶
Inherited documentation.
ForEach(Action<T>)¶
Inherited documentation.
GetRange(int, int)¶
Inherited documentation.
IndexOf(T, int, int)¶
Inherited documentation.
IndexOf(T, int)¶
Inherited documentation.
IndexOf(T)¶
Inherited documentation.
Insert(int, T)¶
Inherited documentation.
InsertRange(int, IEnumerable<T>)¶
Inherited documentation.
LastIndexOf(T)¶
Inherited documentation.
LastIndexOf(T, int)¶
Inherited documentation.
LastIndexOf(T, int, int)¶
Inherited documentation.
Remove(T)¶
Inherited documentation.
RemoveAll(Predicate<T>)¶
Inherited documentation.
RemoveAt(int)¶
Inherited documentation.
RemoveRange(int, int)¶
Inherited documentation.
Reverse(int, int)¶
Inherited documentation.
Reverse()¶
Inherited documentation.
Sort(Comparison<T>)¶
Inherited documentation.
Sort(int, int, IComparer<T>)¶
Inherited documentation.
Sort()¶
Inherited documentation.
Sort(IComparer<T>)¶
Inherited documentation.
ToArray()¶
Inherited documentation.
TrimExcess()¶
Inherited documentation.
TrueForAll(Predicate<T>)¶
Inherited documentation.
GetEnumerator()¶
Inherited documentation.