Esempio n. 1
0
        public static bool IsPreviousOriginTypeFound(this DisplayFilterRowInfo rowInfo, DisplayFilterSettings settings)
        {
            var success = false;

            if (rowInfo.SegmentPair.Properties.TranslationOrigin.OriginBeforeAdaptation != null)
            {
                var previousTranslationType = rowInfo.SegmentPair.GetPreviousTranslationOriginType();
                if (settings.PreviousOriginTypes.ToList()
                    .Any(status => string.Compare(status,
                                                  previousTranslationType.ToString()
                                                  , StringComparison.OrdinalIgnoreCase) == 0))
                {
                    success = true;
                }

                if (!success)
                {
                    success = rowInfo.IsFuzzyMatchRepairPreviousOriginTypeFound(settings);
                }

                if (!success)
                {
                    success = rowInfo.IsPreviousEditedFuzzyMatchFound(settings);
                }

                if (!success)
                {
                    success = rowInfo.IsPreviousUnEditedFuzzyMatchFound(settings);
                }
            }

            return(success);
        }