示例#1
0
文件: ListExt.cs 项目: E01D/Base
 public static Models.E01D.Core.Collections.Generic.List <T> GetRange <T>(this Models.E01D.Core.Collections.Generic.List <T> list, int index, int count)
 {
     return(XLists.Api.GetRange(list, index, count));
 }
示例#2
0
文件: ListExt.cs 项目: E01D/Base
 public static void EnsureCapacity <T>(this Models.E01D.Core.Collections.Generic.List <T> list, int min)
 {
     XLists.Api.EnsureCapacity(list, min);
 }
示例#3
0
文件: ListExt.cs 项目: E01D/Base
 public static Models.E01D.Core.Collections.Generic.List <T> FindAll <T>(this Models.E01D.Core.Collections.Generic.List <T> list, Predicate <T> match)
 {
     return(XLists.Api.FindAll(list, match));
 }
示例#4
0
文件: ListExt.cs 项目: E01D/Base
 // Clears the contents of List.
 public static void Clear <T>(this Models.E01D.Core.Collections.Generic.List <T> list)
 {
     XLists.Api.Clear(list);
 }
示例#5
0
文件: ListExt.cs 项目: E01D/Base
 public static Models.E01D.Core.Collections.Generic.List <T> Copy <T>(this Models.E01D.Core.Collections.Generic.List <T> list)
 {
     return(XLists.Api.Copy(list));
 }
示例#6
0
文件: ListExt.cs 项目: E01D/Base
 public static void SetItem <T>(this Models.E01D.Core.Collections.Generic.List <T> list, int index, T item)
 {
     XLists.Api.SetItem(list, index, item);
 }
示例#7
0
文件: ListExt.cs 项目: E01D/Base
 public static int BinarySearch <T>(this Models.E01D.Core.Collections.Generic.List <T> list, T item)
 {
     return(XLists.Api.BinarySearch(list, item));
 }
示例#8
0
文件: ListExt.cs 项目: E01D/Base
 // Returns the index of the last occurrence of a given value in a range of
 // this list. The list is searched backwards, starting at index
 // index and upto count elements. The elements of
 // the list are compared to the given value using the Object.Equals
 // method.
 //
 // This method uses the Array.LastIndexOf method to perform the
 // search.
 //
 public static int LastIndexOf <T>(this Models.E01D.Core.Collections.Generic.List <T> list, T item, int index, int count)
 {
     return(XLists.Api.LastIndexOf(list, item, index, count));
 }
示例#9
0
文件: ListExt.cs 项目: E01D/Base
 // Removes the element at the given index. The size of the list is
 // decreased by one.
 //
 public static bool Remove <T>(this Models.E01D.Core.Collections.Generic.List <T> list, T item)
 {
     return(XLists.Api.Remove(list, item));
 }
示例#10
0
文件: ListExt.cs 项目: E01D/Base
 public static void Iterate <T>(this Models.E01D.Core.Collections.Generic.List <T> list, Action <T> action)
 {
     XLists.Api.Iterate(list, action);
 }
示例#11
0
文件: ListExt.cs 项目: E01D/Base
 public static TOut Iterate <T, TOut>(this Models.E01D.Core.Collections.Generic.List <T> list, FuncOut <T, TOut, bool> action)
 {
     return(XLists.Api.Iterate(list, action));
 }
示例#12
0
文件: ListExt.cs 项目: E01D/Base
 // Inserts the elements of the given collection at a given index. If
 // required, the capacity of the list is increased to twice the previous
 // capacity or the new size, whichever is larger.  Ranges may be added
 // to the end of the list by setting index to the List's size.
 //
 public static void InsertRange <T>(this Models.E01D.Core.Collections.Generic.List <T> list, int index, IEnumerable <T> collection)
 {
     XLists.Api.InsertRange(list, index, collection);
 }
示例#13
0
文件: ListExt.cs 项目: E01D/Base
 public static T GetItem <T>(this Models.E01D.Core.Collections.Generic.List <T> list, int index)
 {
     return(XLists.Api.GetItem(list, index));
 }
示例#14
0
文件: ListExt.cs 项目: E01D/Base
 // Returns the index of the first occurrence of a given value in a range of
 // this list. The list is searched forwards from beginning to end.
 // The elements of the list are compared to the given value using the
 // Object.Equals method.
 //
 // This method uses the Array.IndexOf method to perform the
 // search.
 //
 public static int IndexOf <T>(this Models.E01D.Core.Collections.Generic.List <T> list, T item)
 {
     return(XLists.Api.IndexOf(list, item));
 }
示例#15
0
文件: ListExt.cs 项目: E01D/Base
 // ToArray returns an array containing the contents of the List.
 // This requires copying the List, which is an O(n) operation.
 public static T[] ToArray <T>(this Models.E01D.Core.Collections.Generic.List <T> list)
 {
     return(XLists.Api.ToArray(list));
 }
示例#16
0
文件: ListExt.cs 项目: E01D/Base
 public static void AddEnumerable <T>(this Models.E01D.Core.Collections.Generic.List <T> list, IEnumerable <T> enumerable)
 {
     XLists.Api.AddEnumerable(list, enumerable);
 }
示例#17
0
文件: ListExt.cs 项目: E01D/Base
 public static void TrimExcess <T>(this Models.E01D.Core.Collections.Generic.List <T> list)
 {
     XLists.Api.TrimExcess(list);
 }
示例#18
0
文件: ListExt.cs 项目: E01D/Base
 // Removes the element at the given index. The size of the list is
 // decreased by one.
 //
 public static void RemoveAt <T>(this Models.E01D.Core.Collections.Generic.List <T> list, int index)
 {
     XLists.Api.RemoveAt(list, index);
 }
示例#19
0
文件: ListExt.cs 项目: E01D/Base
 public static void SetCapacity <T>(this Models.E01D.Core.Collections.Generic.List <T> list, int newCapacity)
 {
     XLists.Api.SetCapacity(list, newCapacity);
 }
示例#20
0
文件: ListExt.cs 项目: E01D/Base
 // Reverses the elements in a range of this list. Following a call to this
 // method, an element in the range given by index and count
 // which was previously located at index i will now be located at
 // index index + (index + count - i - 1).
 //
 public static void Reverse <T>(this Models.E01D.Core.Collections.Generic.List <T> list, int index, int count)
 {
     XLists.Api.Reverse(list, index, count);
 }
示例#21
0
文件: ListExt.cs 项目: E01D/Base
 public static int BinarySearch <T>(this Models.E01D.Core.Collections.Generic.List <T> list, int index, int count, T item, IComparer <T> comparer)
 {
     return(XLists.Api.BinarySearch(list, index, count, item, comparer));
 }
示例#22
0
文件: ListExt.cs 项目: E01D/Base
 // Sorts the elements in this list.  Uses the default comparer and
 // Array.Sort.
 public static void Sort <T>(this Models.E01D.Core.Collections.Generic.List <T> list)
 {
     XLists.Api.Sort(list);
 }
示例#23
0
文件: ListExt.cs 项目: E01D/Base
 public static bool Contains <T>(this Models.E01D.Core.Collections.Generic.List <T> list, T item)
 {
     return(XLists.Api.Contains(list, item));
 }
示例#24
0
文件: ListExt.cs 项目: E01D/Base
 public static void AddRange <T>(this Models.E01D.Core.Collections.Generic.List <T> list, IEnumerable <T> collection)
 {
     XLists.Api.AddRange(list, collection);
 }
示例#25
0
文件: ListExt.cs 项目: E01D/Base
 public static void CopyTo <T>(this Models.E01D.Core.Collections.Generic.List <T> list, int index, T[] array, int arrayIndex, int count)
 {
     XLists.Api.CopyTo(list, index, array, arrayIndex, count);
 }
示例#26
0
文件: ListExt.cs 项目: E01D/Base
 // Sorts the elements in a section of this list. The sort compares the
 // elements to each other using the given IComparer interface. If
 // comparer is null, the elements are compared to each other using
 // the IComparable interface, which in that case must be implemented by all
 // elements of the list.
 //
 // This method uses the Array.Sort method to sort the elements.
 //
 public static void Sort <T>(this Models.E01D.Core.Collections.Generic.List <T> list, int index, int count, IComparer <T> comparer)
 {
     XLists.Api.Sort(list, index, count, comparer);
 }
示例#27
0
文件: ListExt.cs 项目: E01D/Base
 public static bool Exists <T>(this Models.E01D.Core.Collections.Generic.List <T> list, Predicate <T> match)
 {
     return(XLists.Api.Exists(list, match));
 }
示例#28
0
文件: ListExt.cs 项目: E01D/Base
 public static void Sort <T>(this Models.E01D.Core.Collections.Generic.List <T> list, Comparison <T> comparison)
 {
     XLists.Api.Sort(list, comparison);
 }
示例#29
0
文件: ListExt.cs 项目: E01D/Base
 public static int  FindIndex <T>(this Models.E01D.Core.Collections.Generic.List <T> list, int startIndex, Predicate <T> match)
 {
     return(XLists.Api.FindIndex(list, startIndex, match));
 }
示例#30
0
文件: ListExt.cs 项目: E01D/Base
 public static ListEnumerator <T> GetEnumerator <T>(this Models.E01D.Core.Collections.Generic.List <T> list)
 {
     return(XLists.Api.GetEnumerator(list));
 }