Esempio n. 1
0
 /// <summary>
 /// Gets or sets the item on the given index.
 /// If the index passed to set is greater than Count, the SList.Add method will be called,
 /// otherwise we just define the item.
 /// You can pass an index greater than Count (I don't know why would you want that) to the get method, but never greater than Capacity.
 /// </summary>
 /// <param name="index"></param>
 /// <returns></returns>
 public T this[int index]
 {
     get { return(Data[index]); }
     set
     {
         if (index >= Count)
         {
             SList.Add(this, value);
         }
         else
         {
             Data[index] = value;
         }
     }
 }
Esempio n. 2
0
 public void OnAfterDeserialize()
 {
     Id = SList.GetId();
 }
Esempio n. 3
0
 public int GetHashCode(SimpleList <T> obj)
 {
     return(SList.HashCode(obj));
 }
Esempio n. 4
0
 public bool Equals(SimpleList <T> x, SimpleList <T> y)
 {
     return(SList.Compare(x, y));
 }