Наследование: Catel.Data.ModelBase
        public void Load(string fileName = null)
        {
            fileName = GetFileName(fileName);

            Log.Info("Loading filter schemes from '{0}'", fileName);

            FilterSchemes = new FilterSchemes();

            try
            {
                if (File.Exists(fileName))
                {
                    using (var stream = File.Open(fileName, FileMode.Open))
                    {
                        _xmlSerializer.Deserialize(FilterSchemes, stream);
                    }
                }

                Log.Info("Loaded filter schemes from '{0}'", fileName);
            }
            catch (Exception ex)
            {
                Log.Error(ex, "Failed to load filter schemes");
            }

            Loaded.SafeInvoke(this);
            Updated.SafeInvoke(this);
        }
        public FilterSchemeManager(IXmlSerializer xmlSerializer)
        {
            Argument.IsNotNull(() => xmlSerializer);

            _xmlSerializer = xmlSerializer;

            AutoSave = true;
            FilterSchemes = new FilterSchemes();
        }
        private void UpdateFilters()
        {
            _filterSchemes = _filterSchemeManager.FilterSchemes;

            if (RawCollection == null)
            {
                _targetType = null;
                AvailableSchemes = new ObservableCollection<FilterScheme>();
            }
            else
            {
                _targetType = CollectionHelper.GetTargetType(RawCollection);
                AvailableSchemes = new ObservableCollection<FilterScheme>((from scheme in _filterSchemes.Schemes
                                                                           where _targetType.IsAssignableFromEx(scheme.TargetType)
                                                                           select scheme));
            }

            AvailableSchemes.Insert(0, new FilterScheme(typeof(object), "No filter"));

            SelectedFilterScheme = AvailableSchemes.FirstOrDefault();
        }