public string GetSeoPattern(SeoParameterType type, string contentType)
 {
     if (!SeoPatternsDictionary.ContainsKey(type) || !SeoPatternsDictionary[type].ContainsKey(contentType))
     {
         return(null);
     }
     return(SeoPatternsDictionary[type][contentType]);
 }
 public void SetSeoPattern(SeoParameterType type, string contentType, string pattern)
 {
     if (!SeoPatternsDictionary.ContainsKey(type))
     {
         SeoPatternsDictionary[type] = new Dictionary <string, string>();
     }
     SeoPatternsDictionary[type][contentType] = pattern;
     SaveSeoPatternsDictionary();
 }
        private IDictionary <string, string> GetSeoPatternsViewDictionary(SeoParameterType type)
        {
            if (!SeoPatternsViewDictionary.ContainsKey(type))
            {
                var viewDictionary = SeoPatternsViewDictionary[type] = SeoContentTypes.ToDictionary(definition => definition.Name, definition => "");

                if (SeoPatternsDictionary.Count != 0 && SeoPatternsDictionary.ContainsKey(type))
                {
                    foreach (var pattern in SeoPatternsDictionary[type])
                    {
                        viewDictionary[pattern.Key] = pattern.Value;
                    }
                }
            }

            return(SeoPatternsViewDictionary[type]);
        }