public void Refresh(ILookup <string, string> definitionNames)
        {
            ThrowIfNotOnUIThread();

            try
            {
                IsUpdating = true;

                var colorItems = FontsAndColorsHelper.GetColorItems();

                foreach (var classificationItem in GridItems)
                {
                    if (definitionNames.Contains(classificationItem.DefinitionName))
                    {
                        foreach (var colorItem in colorItems)
                        {
                            if (colorItem.AllColorableItemInfo.bstrName == classificationItem.DefinitionName)
                            {
                                FontsAndColorsHelper.RefreshGridItemFromColorItem(classificationItem, colorItem);
                            }
                        }
                    }
                }
            }
            finally
            {
                IsUpdating = false;
            }
        }
        public ClassificationProvider()
        {
            ThrowIfNotOnUIThread();
            var builder = ImmutableArray.CreateBuilder <GridItem>();
            var items   = FontsAndColorsHelper.GetColorItems();

            foreach (var item in items)
            {
                var ci = FontsAndColorsHelper.TryGetGridItemForColorItem(item);
                builder.Add(ci);
            }
            GridItems = builder.ToImmutable();
        }