コード例 #1
0
        public static bool IsOriginTypeFound(this DisplayFilterRowInfo rowInfo, DisplayFilterSettings settings)
        {
            if (!rowInfo.IsSegment)
            {
                return(false);
            }

            var success = false;

            var translationType = rowInfo.SegmentPair.GetOriginType();

            if (!IsCompoundOriginType(translationType) && settings.OriginTypes.ToList().Any(status
                                                                                            => string.Compare(status, translationType.ToString(), StringComparison.OrdinalIgnoreCase) == 0))
            {
                success = true;
            }

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

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

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

            return(success);
        }