Ejemplo n.º 1
0
        public void TrackChangeAfterTransactionCommit(TransactionOperationContext ctx, string operation, string id)
        {
            if (_changes.Count == 0)
            {
                return;
            }

            var llt = ctx.Transaction.InnerTransaction.LowLevelTransaction;


            // need to do this after the transaction is over
            llt.OnDispose += _ =>
            {
                if (llt.Committed == false)
                {
                    return;
                }
                var djv = new GlobalAlertNotification
                {
                    Operation = operation,
                    Id        = id
                };
                foreach (var asyncQueue in _changes)
                {
                    asyncQueue.Enqueue(djv);
                }
            };
        }
Ejemplo n.º 2
0
        public void TrackChange(string operation, string id)
        {
            if (_changes.Count == 0)
            {
                return;
            }

            var djv = new GlobalAlertNotification
            {
                Operation = operation,
                Id        = id
            };

            foreach (var asyncQueue in _changes)
            {
                asyncQueue.Enqueue(djv);
            }
        }