Exemple #1
0
        public T pop()
        {
            Debug.Assert(iLast != iFirst);
            iFirst = iFirst.next;
            var obj = iFirst.data;

            return((T)obj);
        }
Exemple #2
0
        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);
        }
Exemple #4
0
 public myQueue()
 {
     iLast  = new queueItem();
     iFirst = iLast;
 }