public static List Items(IDictionary <object, object> self) { List ret = List.MakeEmptyList(self.Count); foreach (KeyValuePair <object, object> kv in self) { ret.AddNoLock(Tuple.MakeTuple(kv.Key, kv.Value)); } return(ret); }
public virtual object GetSlice(int start, int stop) { if (start < 0) { start = 0; } if (stop > GetLength()) { stop = GetLength(); } if (start > stop) { return(List.MakeEmptyList(0)); } int n = Math.Max(0, stop - start); object[] ret = new object[n]; lock (this) Array.Copy(data, start, ret, 0, n); return(new List(ret)); }
public virtual List GetAttrNames(ICallerContext context, object self) { return(List.MakeEmptyList(0)); }