public T pop() { Debug.Assert(iLast != iFirst); iFirst = iFirst.next; var obj = iFirst.data; return((T)obj); }
public void push(object obj) { var newItem = new queueItem() { data = obj }; iLast.next = newItem; iLast = newItem; }
public void addToQueue(string fileName_arg, string strToAdd_arg) { queueItem newItem = new queueItem(); newItem.time = DateTime.Now; newItem.fileName = dir + "\\" + fileName_arg; newItem.toWrite = strToAdd_arg; if (!File.Exists(newItem.fileName)) { lock (lockLogger) { writer = File.CreateText(newItem.fileName); writer.WriteLine(getColumnHeader(newItem.fileName)); writer.Close(); } } queue.Add(newItem); }
public myQueue() { iLast = new queueItem(); iFirst = iLast; }