/////////////////////////////////////

        static bool UrlCollectionHasEvidence(IEnumerable <string?>?urls1, IEnumerable <string?>?urls2, StringComparer comp, out bool isDifferentIdentity)
        {
            isDifferentIdentity = true;

            if (urls1 == null || urls2 == null)
            {
                return(false);
            }

            var arr1 = urls1.Where(x => !Strip.IsEmpty(x)).ToArray();
            var arr2 = urls2.Where(x => !Strip.IsEmpty(x)).ToArray();

            if (arr1.Length != 0 && arr2.Length != 0)
            {
                isDifferentIdentity = !arr1.Intersect(arr2, comp).Any();
                return(true);
            }

            return(false);
        }
Exemplo n.º 2
0
 public void IsEmptyTest2(string?input, bool expected) => Assert.AreEqual(expected, Strip.IsEmpty(input));
Exemplo n.º 3
0
 internal static string?CleanDataEntry(string?val)
 => Strip.IsEmpty(val)
                 ? null
                 : Regex.Replace(val.Trim(), @"\s+", " ", RegexOptions.Compiled
                                 | RegexOptions.Singleline
                                 | RegexOptions.CultureInvariant);