コード例 #1
0
        protected bool Store(TestMessage message)
        {
            using (var scope = new TransactionScope())
            using (var msgStream = new MemoryStream(message.OriginalMessage))
            {
                var result = ravenPersister.InsertMessage(message.ClientId, message.TimeReceived, msgStream, message.Headers);
                scope.Complete();

                return result;
            }
        }
コード例 #2
0
        protected bool Store(TestMessage message)
        {
            //todo: The TXScope causes raven to return null on later loads so we keep it out for now
            //using (var scope = new TransactionScope())
            using (var msgStream = new MemoryStream(message.OriginalMessage))
            {
                var result = ravenPersister.InsertMessage(message.ClientId, message.TimeReceived, msgStream, message.Headers);

                //scope.Complete();

                return result;
            }
        }