Ejemplo n.º 1
0
        //TODO: Break this out to a separate repository so that we can register it in the container
        //using either the SQL or MSMQ implementation.
        public IReadOnlyList <ErrorReportEntity> GetReportsToAnalyze()
        {
            if (_queue == null)
            {
                return(GetReportsUsingSql());
            }


            var report = _queue.TryReceive <ErrorReportEntity>(TimeSpan.FromSeconds(1));

            return(new[] { report });
        }