public static InterpTimedEvent.ArgList New(object[] args) { InterpTimedEvent.ArgList list; int length = (args != null) ? args.Length : 0; if (length == 0) { return(voidParameters); } if (dumps.Length > length) { list = Recycle(ref dumps[length], length); } else { list = new InterpTimedEvent.ArgList(length); } for (int i = 0; i < length; i++) { object obj2 = args[i]; list.parameters[i] = obj2; list.types[i] = (obj2 != null) ? obj2.GetType() : typeof(void); } return(list); }
private static InterpTimedEvent.ArgList Recycle(ref Dump dump, int length) { if (dump.count > 0) { InterpTimedEvent.ArgList last = dump.last; dump.last = last.dumpNext; dump.count--; last.dumpNext = null; last.disposed = false; return(last); } return(new InterpTimedEvent.ArgList(length)); }
private static InterpTimedEvent.ArgList Recycle(ref InterpTimedEvent.ArgList.Dump dump, int length) { if (dump.count <= 0) { return(new InterpTimedEvent.ArgList(length)); } InterpTimedEvent.ArgList argList = dump.last; dump.last = argList.dumpNext; dump.count = dump.count - 1; argList.dumpNext = null; argList.disposed = false; return(argList); }
public void Dispose() { if (this.inlist) { InterpTimedEvent.queue.Remove(this); } if (!this.disposed) { this.prev = new InterpTimedEvent.Dir(); this.next = InterpTimedEvent.dump; InterpTimedEvent.dump.has = true; InterpTimedEvent.dump.node = this; this.component = null; this.args.Dispose(); this.args = null; this.info = null; this.tag = null; InterpTimedEvent.dumpCount = InterpTimedEvent.dumpCount + 1; this.disposed = true; } }
private void AddToDump(ref Dump dump) { this.dumpNext = dump.last; dump.count++; dump.last = this; }
private void AddToDump(ref InterpTimedEvent.ArgList.Dump dump) { this.dumpNext = dump.last; dump.count = dump.count + 1; dump.last = this; }