public void Clear()
 {
     if (QueueType == "BlockingCollection")
     {
         ProcessBlockingCollection.Clear();
     }
     else
     {
         ProcessList.Clear();
     }
 }
 public void OrderByPriority()
 {
     if (QueueType == "BlockingCollection")
     {
         ProcessBlockingCollection.OrderByPriority();
     }
     else
     {
         ProcessList.OrderByPriority();
     }
 }
 public IEnumerator GetEnumerator()
 {
     if (QueueType == "BlockingCollection")
     {
         return(ProcessBlockingCollection.GetConsumingEnumerable().GetEnumerator());
     }
     else
     {
         return(ProcessList.GetEnumerator());
     }
 }
 public Process Take()
 {
     if (QueueType == "BlockingCollection")
     {
         return(ProcessBlockingCollection.Take());
     }
     else
     {
         return(ProcessList.Take());
     }
 }
 public List <Process> GetProcessList()
 {
     if (QueueType == "BlockingCollection")
     {
         return(ProcessBlockingCollection.ToList());
     }
     else
     {
         return(ProcessList);
     }
 }
 public void Insert(int index, Process process)
 {
     if (QueueType == "BlockingCollection")
     {
         ProcessBlockingCollection.Insert(index, process);
     }
     else
     {
         ProcessList.Insert(index, process);
     }
 }
 public bool Remove(string id)
 {
     if (QueueType == "BlockingCollection")
     {
         return(ProcessBlockingCollection.Remove(id));
     }
     else
     {
         return(ProcessList.Remove(id));
     }
 }
 public void Add(Process process)
 {
     if (QueueType == "BlockingCollection")
     {
         ProcessBlockingCollection.Add(process);
     }
     else
     {
         ProcessList.Add(process);
     }
 }
 public BaseProcessQueue(string type)
 {
     QueueType = type;
     if (QueueType == "BlockingCollection")
     {
         ProcessBlockingCollection = new ProcessBlockingCollection();
     }
     else
     {
         ProcessList = new ProcessList();
     }
 }