Exemple #1
0
        public void TestAppropriateAllRegex()
        {
            var testResultOut = _hardCodedIpV4;

            RegexCatalog.AppropriateAllRegex(ref testResultOut, Regex2Values);
            Assert.AreEqual(Regex2Values[_hardCodedIpV4], testResultOut);
        }
Exemple #2
0
        internal static void AppropriateAllRegex(XmlAttribute attr, Hashtable regex2Values)
        {
            var newAppVal = attr?.Value;

            if (string.IsNullOrEmpty(newAppVal))
            {
                return;
            }
            if (regex2Values == null || regex2Values.Count <= 0)
            {
                return;
            }

            RegexCatalog.AppropriateAllRegex(ref newAppVal, regex2Values);
            attr.Value = newAppVal;
        }