/// <summary>
        /// Add preferences renderer
        /// </summary>
        /// <param name="names"></param>
        /// <param name="renderer"></param>
        /// <exception cref="ArgumentNullException"></exception>
        public static void AddPreferencesRenderer(List <string> names, IPreferencesRenderer renderer)
        {
            if (renderer == null)
            {
                throw new ArgumentNullException(nameof(renderer));
            }
            if (names == null || !names.Any())
            {
                throw new ArgumentNullException(nameof(names));
            }
            lock (_preferencesRendersLock) {
                var hasCustomFormatProvider = renderer.CustomFormatProvider != null;
                foreach (var name in names)
                {
                    var ignoreCaseName = name.ToLowerInvariant();
                    if (!_preferencesRenders.ContainsKey(ignoreCaseName))
                    {
                        _preferencesRenders.Add(ignoreCaseName, renderer);
                        if (hasCustomFormatProvider)
                        {
                            CustomFormatProviderManager.Add(ignoreCaseName, renderer.CustomFormatProvider.CreateCommandEvent);
                        }
                    }
                }

                if (names.All(name => string.Compare(name, renderer.Name, StringComparison.OrdinalIgnoreCase) != 0))
                {
                    var ignoreCaseName = renderer.Name.ToLowerInvariant();
                    if (!_preferencesRenders.ContainsKey(ignoreCaseName))
                    {
                        _preferencesRenders.Add(ignoreCaseName, renderer);
                        if (hasCustomFormatProvider)
                        {
                            CustomFormatProviderManager.Add(ignoreCaseName, renderer.CustomFormatProvider.CreateCommandEvent);
                        }
                    }
                }
            }
        }
        /// <summary>
        /// Add preferences renderer
        /// </summary>
        /// <param name="renderer"></param>
        /// <exception cref="ArgumentNullException"></exception>
        public static void AddPreferencesRenderer(IPreferencesRenderer renderer)
        {
            if (renderer == null)
            {
                throw new ArgumentNullException(nameof(renderer));
            }
            var ignoreCaseName = renderer.Name.ToLowerInvariant();

            // ReSharper disable once InconsistentlySynchronizedField
            if (!_preferencesRenders.ContainsKey(ignoreCaseName))
            {
                lock (_preferencesRendersLock) {
                    if (!_preferencesRenders.ContainsKey(ignoreCaseName))
                    {
                        _preferencesRenders.Add(ignoreCaseName, renderer);
                        if (renderer.CustomFormatProvider != null)
                        {
                            CustomFormatProviderManager.Add(ignoreCaseName, renderer.CustomFormatProvider.CreateCommandEvent);
                        }
                    }
                }
            }
        }