void load_reduce() { object[] args = (object[])stack.pop(); IObjectConstructor constructor = (IObjectConstructor)stack.pop(); stack.add(constructor.construct(args)); }
void load_obj() { ArrayList args = stack.pop_all_since_marker(); IObjectConstructor constructor = (IObjectConstructor)args[0]; args = args.GetRange(1, args.Count - 1); object obj = constructor.construct(args.ToArray()); stack.add(obj); }
private void load_newobj_ex() { Hashtable kwargs = (Hashtable)stack.pop(); var args = (object[])stack.pop(); IObjectConstructor constructor = (IObjectConstructor)stack.pop(); if (kwargs.Count == 0) { stack.add(constructor.construct(args)); } else { throw new PickleException("newobj_ex with keyword arguments not supported"); } }