aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/IdsPacksViewVM.cs
blob: 202dd959f4ce350a676f2b8e2390b8fd3bdbcbfc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.DAL.Observables;
using Tango.MachineStudio.Common.Notifications;

namespace Tango.MachineStudio.DB.ViewModels
{
    public class IdsPacksViewVM : DbTableViewModel<IdsPack>
    {
        public IdsPacksViewVM(INotificationProvider notification) : base(notification)
        {
            
        }
    }
}
>T> { /// <summary> /// Initializes a new instance of the ProducerConsumerQueue, Use Add and TryAdd for Enqueue and TryEnqueue and Take and TryTake for Dequeue and TryDequeue functionality /// </summary> public ProducerConsumerQueue() : base(new ConcurrentQueue<T>()) { } /// <summary> /// Initializes a new instance of the ProducerConsumerQueue, Use Add and TryAdd for Enqueue and TryEnqueue and Take and TryTake for Dequeue and TryDequeue functionality /// </summary> /// <param name="maxSize"></param> public ProducerConsumerQueue(int maxSize) : base(new ConcurrentQueue<T>(), maxSize) { } /// <summary> /// Enqueues the specified item. /// </summary> /// <param name="item">The item.</param> public void BlockEnqueue(T item) { Add(item); } /// <summary> /// Blocks until an item is available for dequeuing. /// </summary> /// <returns></returns> public T BlockDequeue() { return Take(); } /// <summary> /// Blocks until an item is available for dequeuing. /// </summary> /// <param name="cancellationToken">The cancellation token.</param> /// <returns></returns> public T BlockDequeue(CancellationToken cancellationToken) { return Take(cancellationToken); } } }