public IEnumerable <ExceptionObject> Search([NotNull] QaError qaError)
        {
            string key = ExceptionObjectUtils.GetKey(qaError.InvolvedRows,
                                                     _excludeTableFromKey);

            List <ExceptionObject> exceptionObjects;

            return(_index.TryGetValue(key, out exceptionObjects)
                                       ? exceptionObjects
                                       : _emptyList);
        }
Пример #2
0
        private ExceptionObjectStatus GetStatus([NotNull] IRow row)
        {
            if (_exceptionStatusIndex < 0)
            {
                return(_defaultStatus);
            }

            string value = GetString(row, _exceptionStatusIndex);

            return(ExceptionObjectUtils.ParseStatus(value, _defaultStatus));
        }
        public void Add([NotNull] ExceptionObject exceptionObject)
        {
            string key = ExceptionObjectUtils.GetKey(exceptionObject.InvolvedTables,
                                                     _excludeTableFromKey);

            List <ExceptionObject> exceptionObjects;

            if (!_index.TryGetValue(key, out exceptionObjects))
            {
                exceptionObjects = new List <ExceptionObject>();
                _index.Add(key, exceptionObjects);
            }

            exceptionObjects.Add(exceptionObject);
        }