public Notification[] GetResultNotifications(string resultUuid)
        {
            _Trace.TraceEvent(TraceEventType.Verbose, -1, "GetResultNotifications");

            Guid guid = new Guid(resultUuid);
            NotificationEntity[] entities = new CriticalResultsEntityManager().GetResultNotifications(guid);
            List<Notification> notifications = new List<Notification>();
            foreach (NotificationEntity entity in entities)
            {
                Notification n = new Notification(entity);
                n.ResolveUserTransport();
                n.UserTransport.ResolveTransport();
                notifications.Add(n);
            }
            return notifications.ToArray();
        }
        public Notification[] GetNotifications(string notificationStateName, string startDateRangeString, string endDateRangeString)
        {
            //CheckHTTPBasicAuth();
            _Trace.TraceEvent(TraceEventType.Verbose, -1, "GetNotifications");

            string queryString = string.Format("it.State = '{0}'", notificationStateName);

            if (!string.IsNullOrEmpty(startDateRangeString))
            {
                DateTime startDateRange = DateTime.Parse(startDateRangeString);
                queryString += string.Format(" AND it.CreationTime > DATETIME'{0}'", startDateRange.ToString("yyyy-MM-dd hh:mm"));
            }
            if (!string.IsNullOrEmpty(endDateRangeString))
            {
                DateTime endDateRange = DateTime.Parse(endDateRangeString);
                queryString += string.Format(" AND it.CreationTime < DATETIME'{0}'", endDateRange.ToString("yyyy-MM-dd hh:mm"));
            }

            NotificationEntity[] entities = new CriticalResultsEntityManager().QueryNotificationEntity(queryString, null, null);
            List<Notification> results = new List<Notification>();

            foreach (NotificationEntity entity in entities)
            {
                Notification n = new Notification(entity);
                n.ResolveResult();
                n.Result.ResolveSender();
                n.ResolveUserTransport();
                n.UserTransport.ResolveTransport();
                n.UserTransport.ResolveUser();
                results.Add(n);
            }
            return results.ToArray() ;
        }