Beispiel #1
0
        public async Task <short> Update(Queue queue)
        {
            var now = SystemClock.Instance.GetCurrentInstant().InUtc().ToDateTimeUtc();

            tQueue queueDo = await messageQueueContext.tQueues.SingleOrDefaultAsync(q => q.Name == queue.Name);

            queueDo.Changed = now;
            await messageQueueContext.SaveChangesAsync();

            return(queueDo.QueueId);
        }
Beispiel #2
0
        public async Task <short> Add(Queue queue)
        {
            var now = SystemClock.Instance.GetCurrentInstant().InUtc().ToDateTimeUtc();

            tQueue queue_ = new tQueue
            {
                Name    = queue.Name,
                Changed = now,
                Added   = now
            };

            await messageQueueContext.AddAsync(queue_);

            await messageQueueContext.SaveChangesAsync();

            return(queue_.QueueId);
        }
Beispiel #3
0
 InterObjComm(ref tQueue tQ, ref MainWindow mWin)
 {
     tQueue = tQ;
     mainWin = mWin;
 }