/// <summary>
        /// Adds a standard type mapping based on namespace RegEx replace and filter patterns
        /// </summary>
        /// <param name="nsSourceReplaceRegEx">RegEx replace pattern for source namespace</param>
        /// <param name="nsSourceFilterRegEx">RegEx filter pattern for source namespace</param>
        /// <param name="nsTargetsRegEx">Array of RegEx replace values for target namespaces</param>
        /// <param name="viewSuffix">Suffix for type name. Should  be "View" or synonym of "View". (Optional)</param>
        public static void AddTypeMapping(string nsSourceReplaceRegEx, string nsSourceFilterRegEx,
                                          string[] nsTargetsRegEx, string viewSuffix = "View")
        {
            RegisterViewSuffix(viewSuffix);

            var          repsuffix = _useNameSuffixesInMappings ? viewSuffix : string.Empty;
            const string basegrp   = "${basename}";

            var rxbase = RegExHelper.GetNameCaptureGroup("basename");
            var suffix = string.Empty;

            if (_useNameSuffixesInMappings)
            {
                suffix = _viewModelSuffix;
                if (!_viewModelSuffix.Contains(viewSuffix) && _includeViewSuffixInVmNames)
                {
                    suffix = viewSuffix + suffix;
                }
            }
            var rxsrcfilter = string.IsNullOrEmpty(nsSourceFilterRegEx)
                ? null
                : string.Concat(nsSourceFilterRegEx, string.Format(_nameFormat, RegExHelper.NameRegEx, suffix), "$");
            var rxsuffix = RegExHelper.GetCaptureGroup("suffix", suffix);

            NameTransformer.AddRule(
                string.Concat(nsSourceReplaceRegEx, string.Format(_nameFormat, rxbase, rxsuffix), "$"),
                nsTargetsRegEx.Select(t => t + string.Format(_nameFormat, basegrp, repsuffix)).ToArray(),
                rxsrcfilter
                );
        }
        /// <summary>
        /// Adds a standard type mapping based on namespace RegEx replace and filter patterns
        /// </summary>
        /// <param name="nsSourceReplaceRegEx">RegEx replace pattern for source namespace</param>
        /// <param name="nsSourceFilterRegEx">RegEx filter pattern for source namespace</param>
        /// <param name="nsTargetsRegEx">Array of RegEx replace values for target namespaces</param>
        /// <param name="viewSuffix">Suffix for type name. Should  be "View" or synonym of "View". (Optional)</param>
        public static void AddTypeMapping(string nsSourceReplaceRegEx, string nsSourceFilterRegEx,
                                          string[] nsTargetsRegEx, string viewSuffix = "View")
        {
            var             replist = new List <string>();
            Action <string> func;

            const string basegrp      = "${basename}";
            var          interfacegrp = "${" + InterfaceCaptureGroupName + "}";

            if (_useNameSuffixesInMappings)
            {
                if (_viewModelSuffix.Contains(viewSuffix) || !_includeViewSuffixInVmNames)
                {
                    var nameregex = string.Format(_nameFormat, basegrp, _viewModelSuffix);
                    func = t =>
                    {
                        replist.Add(t + "I" + nameregex + interfacegrp);
                        replist.Add(t + "I" + basegrp + interfacegrp);
                        replist.Add(t + nameregex);
                        replist.Add(t + basegrp);
                    };
                }
                else
                {
                    var nameregex = string.Format(_nameFormat, basegrp, "${suffix}" + _viewModelSuffix);
                    func = t =>
                    {
                        replist.Add(t + "I" + nameregex + interfacegrp);
                        replist.Add(t + nameregex);
                    };
                }
            }
            else
            {
                func = t =>
                {
                    replist.Add(t + "I" + basegrp + interfacegrp);
                    replist.Add(t + basegrp);
                };
            }

            foreach (var t in nsTargetsRegEx)
            {
                func(t);
            }

            var suffix = _useNameSuffixesInMappings ? viewSuffix : string.Empty;

            var srcfilterregx = string.IsNullOrEmpty(nsSourceFilterRegEx)
                ? null
                : string.Concat(nsSourceFilterRegEx, string.Format(_nameFormat, RegExHelper.NameRegEx, suffix), "$");
            var rxbase   = RegExHelper.GetNameCaptureGroup("basename");
            var rxsuffix = RegExHelper.GetCaptureGroup("suffix", suffix);

            //Add a dummy capture group -- place after the "$" so it can never capture anything
            var rxinterface = RegExHelper.GetCaptureGroup(InterfaceCaptureGroupName, string.Empty);

            NameTransformer.AddRule(
                string.Concat(nsSourceReplaceRegEx, string.Format(_nameFormat, rxbase, rxsuffix), "$", rxinterface),
                replist.ToArray(),
                srcfilterregx
                );
        }