Beispiel #1
0
 internal static ReplaceablePattern GetConfigurationReplaceablePattern(string alias, string replacement = "")
 {
     if (MerchelloConfiguration.Current.PatternFormatter[alias] == null) return null;
     
     var pattern = new ReplaceablePattern(MerchelloConfiguration.Current.PatternFormatter[alias]);
     
     if (!string.IsNullOrEmpty(replacement)) pattern.Replacement = replacement;
     
     return pattern;
 }
Beispiel #2
0
        internal static ReplaceablePattern GetConfigurationReplaceablePattern(string alias, string replacement = "")
        {
            if (MerchelloConfiguration.Current.PatternFormatter[alias] == null)
            {
                return(null);
            }

            var pattern = new ReplaceablePattern(MerchelloConfiguration.Current.PatternFormatter[alias]);

            if (!string.IsNullOrEmpty(replacement))
            {
                pattern.Replacement = replacement;
            }

            return(pattern);
        }