public FindAllImplementationsCommand(INavigateCommand navigateCommand, IMessageBox messageBox, RubberduckParserState state, IVBE vbe, ISearchResultsWindowViewModel viewModel, SearchResultPresenterInstanceManager presenterService, IUiDispatcher uiDispatcher) : base(LogManager.GetCurrentClassLogger()) { _navigateCommand = navigateCommand; _messageBox = messageBox; _state = state; _vbe = vbe; _viewModel = viewModel; _presenterService = presenterService; _uiDispatcher = uiDispatcher; _state.StateChanged += _state_StateChanged; }
public BackgroundTask( IUiDispatcher uiDispatcher, BackgroundTaskManager manager, Func <IBackgroundTask, object, TResult> onWork, Action <TResult, object> onCompleted, object state, bool isIndeterminate) { this.uiDispatcher = uiDispatcher; this.manager = manager; this.onWork = onWork; this.onCompleted = onCompleted; this.state = state; this.isIndeterminate = isIndeterminate; }
public CodeMetricsViewModel( RubberduckParserState state, ICodeMetricsAnalyst analyst, IVBE vbe, IUiDispatcher uiDispatcher) { _state = state; _state.StateChanged += OnStateChanged; _analyst = analyst; _vbe = vbe; _uiDispatcher = uiDispatcher; OnPropertyChanged(nameof(Projects)); }
/// <summary> /// Creates a new instance of the <see cref="PhotosLoader"/> class. /// Use this constructor for when you want to load a <b>list of photos</b>. /// </summary> /// <param name="logService">The log service to use if and when logging errors.</param> /// <param name="networkService">The network service to use for checking connectivity.</param> /// <param name="neuronService">The neuron service to know which XMPP server to connect to.</param> /// <param name="uiDispatcher">The UI dispatcher to use for alerts and context switching.</param> /// <param name="imageCacheService">The image cache service to use for optimizing requests.</param> /// <param name="photos">The collection the photos should be added to when downloaded.</param> public PhotosLoader( ILogService logService, INetworkService networkService, INeuronService neuronService, IUiDispatcher uiDispatcher, IImageCacheService imageCacheService, ObservableCollection <ImageSource> photos) { this.logService = logService; this.networkService = networkService; this.neuronService = neuronService; this.uiDispatcher = uiDispatcher; this.imageCacheService = imageCacheService; this.photos = photos; this.attachmentIds = new List <string>(); }
public FindAllReferencesAction( INavigateCommand navigateCommand, IMessageBox messageBox, RubberduckParserState state, ISearchResultsWindowViewModel viewModel, SearchResultPresenterInstanceManager presenterService, IUiDispatcher uiDispatcher) { _navigateCommand = navigateCommand; _messageBox = messageBox; _state = state; _viewModel = viewModel; _presenterService = presenterService; _uiDispatcher = uiDispatcher; _state.StateChanged += _state_StateChanged; }
/// <summary> /// Creates a new instance of the <see cref="ChooseOperatorViewModel"/> class. /// </summary> /// <param name="tagProfile">The tag profile to work with.</param> /// <param name="uiDispatcher">The UI dispatcher for alerts.</param> /// <param name="neuronService">The Neuron service for XMPP communication.</param> /// <param name="navigationService">The navigation service to use for app navigation</param> /// <param name="settingsService">The settings service for persisting UI state.</param> /// <param name="networkService">The network service for network access.</param> /// <param name="logService">The log service.</param> public ChooseOperatorViewModel( ITagProfile tagProfile, IUiDispatcher uiDispatcher, INeuronService neuronService, INavigationService navigationService, ISettingsService settingsService, INetworkService networkService, ILogService logService) : base(RegistrationStep.Operator, tagProfile, uiDispatcher, neuronService, navigationService, settingsService, logService) { this.networkService = networkService; this.Operators = new ObservableCollection <string>(); this.ConnectCommand = new Command(async() => await Connect(), ConnectCanExecute); this.ManualOperatorCommand = new Command <string>(async text => await ManualOperatorTextEdited(text)); this.PopulateOperators(); this.Title = AppResources.SelectOperator; }
/// <summary> /// Creates a new instance of the <see cref="RegisterIdentityViewModel"/> class. /// </summary> /// <param name="step">The current step for this instance.</param> /// <param name="tagProfile">The tag profile to work with.</param> /// <param name="uiDispatcher">The UI dispatcher for alerts.</param> /// <param name="neuronService">The Neuron service for XMPP communication.</param> /// <param name="navigationService">The navigation service to use for app navigation</param> /// <param name="settingsService">The settings service for persisting UI state.</param> /// <param name="logService">The log service.</param> public RegistrationStepViewModel( RegistrationStep step, ITagProfile tagProfile, IUiDispatcher uiDispatcher, INeuronService neuronService, INavigationService navigationService, ISettingsService settingsService, ILogService logService) { this.Step = step; this.UiDispatcher = uiDispatcher; this.TagProfile = tagProfile; this.NeuronService = neuronService; this.NavigationService = navigationService; this.SettingsService = settingsService; this.LogService = logService; }
public ShowParserErrorsCommand( INavigateCommand navigateCommand, RubberduckParserState state, ISearchResultsWindowViewModel viewModel, SearchResultPresenterInstanceManager presenterService, IUiDispatcher uiDispatcher, IVbeEvents vbeEvents) : base(vbeEvents) { _navigateCommand = navigateCommand; _state = state; _viewModel = viewModel; _presenterService = presenterService; _uiDispatcher = uiDispatcher; _state.StateChanged += _state_StateChanged; }
public ContractOrchestratorService( ITagProfile tagProfile, IUiDispatcher uiDispatcher, INeuronService neuronService, INavigationService navigationService, ILogService logService, INetworkService networkService, ISettingsService settingsService) { this.tagProfile = tagProfile; this.uiDispatcher = uiDispatcher; this.neuronService = neuronService; this.navigationService = navigationService; this.logService = logService; this.networkService = networkService; this.settingsService = settingsService; }
public TestEngine(RubberduckParserState state, IFakesFactory fakesFactory, IVBEInteraction declarationRunner, ITypeLibWrapperProvider wrapperProvider, IUiDispatcher uiDispatcher, IVBE vbe) { Debug.WriteLine("TestEngine created."); _state = state; _fakesFactory = fakesFactory; _declarationRunner = declarationRunner; _wrapperProvider = wrapperProvider; _uiDispatcher = uiDispatcher; _vbe = vbe; _state.StateChanged += StateChangedHandler; // avoid nulls in results by outcome foreach (TestOutcome outcome in Enum.GetValues(typeof(TestOutcome))) { resultsByOutcome.Add(outcome, new List <TestMethod>()); } }
public TestEngine( RubberduckParserState state, IFakesFactory fakesFactory, IVBEInteraction declarationRunner, ITypeLibWrapperProvider wrapperProvider, IUiDispatcher uiDispatcher, IVBE vbe) { Debug.WriteLine("TestEngine created."); _state = state; _fakesFactory = fakesFactory; _declarationRunner = declarationRunner; _wrapperProvider = wrapperProvider; _uiDispatcher = uiDispatcher; _vbe = vbe; _state.StateChanged += StateChangedHandler; }
#pragma warning restore IDE0052 // Remove unread private members // ReSharper restore NotAccessedField.Local public CodeExplorerViewModel( RubberduckParserState state, RemoveCommand removeCommand, IConfigurationService <GeneralSettings> generalSettingsProvider, IConfigurationService <WindowSettings> windowSettingsProvider, IUiDispatcher uiDispatcher, IVBE vbe, ITemplateProvider templateProvider, ICodeExplorerSyncProvider syncProvider, IEnumerable <IAnnotation> annotations) { _state = state; _state.StateChanged += HandleStateChanged; _state.ModuleStateChanged += ParserState_ModuleStateChanged; _generalSettingsProvider = generalSettingsProvider; _generalSettingsProvider.SettingsChanged += GeneralSettingsChanged; RefreshDragAndDropSetting(); _windowSettingsProvider = windowSettingsProvider; _uiDispatcher = uiDispatcher; _vbe = vbe; _templateProvider = templateProvider; _externalRemoveCommand = removeCommand; Annotations = annotations.ToList(); CollapseAllSubnodesCommand = new DelegateCommand(LogManager.GetCurrentClassLogger(), ExecuteCollapseNodes, EvaluateCanSwitchNodeState); ExpandAllSubnodesCommand = new DelegateCommand(LogManager.GetCurrentClassLogger(), ExecuteExpandNodes, EvaluateCanSwitchNodeState); ClearSearchCommand = new DelegateCommand(LogManager.GetCurrentClassLogger(), ExecuteClearSearchCommand); CollapseAllCommand = new DelegateCommand(LogManager.GetCurrentClassLogger(), ExecuteCollapseAllCommand); ExpandAllCommand = new DelegateCommand(LogManager.GetCurrentClassLogger(), ExecuteExpandAllCommand); if (_externalRemoveCommand != null) { RemoveCommand = new DelegateCommand(LogManager.GetCurrentClassLogger(), ExecuteRemoveCommand, _externalRemoveCommand.CanExecute); } OnPropertyChanged(nameof(Projects)); SyncCodePaneCommand = syncProvider.GetSyncCommand(this); // Force a call to EvaluateCanExecute OnPropertyChanged(nameof(SyncCodePaneCommand)); }
/// <summary> /// Creates an instance of the <see cref="ViewClaimThingViewModel"/> class. /// </summary> public ViewClaimThingViewModel( ITagProfile tagProfile, IUiDispatcher uiDispatcher, INeuronService neuronService, INavigationService navigationService, INetworkService networkService, ILogService logService) : base(neuronService, uiDispatcher) { this.tagProfile = tagProfile; this.logService = logService; this.navigationService = navigationService; this.networkService = networkService; this.ClaimThingCommand = new Command(async _ => await ClaimThing(), _ => IsConnected); this.Tags = new ObservableCollection <HumanReadableTag>(); this.ClickCommand = new Command(async x => await this.LabelClicked(x)); }
/// <summary> /// Creates a new instance of the <see cref="ValidateIdentityViewModel"/> class. /// <param name="tagProfile">The tag profile to work with.</param> /// <param name="uiDispatcher">The UI dispatcher for alerts.</param> /// <param name="neuronService">The Neuron service for XMPP communication.</param> /// <param name="navigationService">The navigation service to use for app navigation</param> /// <param name="settingsService">The settings service for persisting UI state.</param> /// <param name="networkService">The network service for network access.</param> /// <param name="logService">The log service.</param> /// <param name="imageCacheService">The image cache to use.</param> /// </summary> public ValidateIdentityViewModel( ITagProfile tagProfile, IUiDispatcher uiDispatcher, INeuronService neuronService, INavigationService navigationService, ISettingsService settingsService, INetworkService networkService, ILogService logService, IImageCacheService imageCacheService) : base(RegistrationStep.ValidateIdentity, tagProfile, uiDispatcher, neuronService, navigationService, settingsService, logService) { this.networkService = networkService; this.InviteReviewerCommand = new Command(async _ => await InviteReviewer(), _ => this.State == IdentityState.Created && this.NeuronService.IsOnline); this.ContinueCommand = new Command(_ => Continue(), _ => IsApproved); this.Title = AppResources.ValidatingInformation; this.Photos = new ObservableCollection <ImageSource>(); imageCacheService = imageCacheService ?? DependencyService.Resolve <IImageCacheService>(); this.photosLoader = new PhotosLoader(logService, networkService, neuronService, uiDispatcher, imageCacheService, this.Photos); }
public NeuronService( Assembly appAssembly, ITagProfile tagProfile, IUiDispatcher uiDispatcher, INetworkService networkService, ILogService logService, ISettingsService settingsService, Profiler startupProfiler) { this.appAssembly = appAssembly; this.networkService = networkService; this.logService = logService; this.tagProfile = tagProfile; this.settingsService = settingsService; this.contracts = new NeuronContracts(this.tagProfile, uiDispatcher, this, this.logService, this.settingsService); this.muc = new NeuronMultiUserChat(this.tagProfile, uiDispatcher, this, this.logService); this.thingRegistry = new NeuronThingRegistry(this.tagProfile, uiDispatcher, this, this.logService); this.sniffer = new InMemorySniffer(250); this.startupProfiler = startupProfiler; }
/// <summary> /// Creates a new instance of the <see cref="PetitionIdentityViewModel"/> class. /// For unit tests. /// <param name="neuronService">The Neuron service for XMPP communication.</param> /// <param name="navigationService">The navigation service to use for app navigation</param> /// <param name="logService">The log service.</param> /// <param name="networkService">The network and connectivity service.</param> /// <param name="uiDispatcher">The UI dispatcher for alerts.</param> /// <param name="imageCacheService">The image cache to use.</param> /// </summary> protected internal PetitionIdentityViewModel( INeuronService neuronService, INavigationService navigationService, ILogService logService, INetworkService networkService, IUiDispatcher uiDispatcher, IImageCacheService imageCacheService) { this.neuronService = neuronService ?? DependencyService.Resolve <INeuronService>(); this.navigationService = navigationService ?? DependencyService.Resolve <INavigationService>(); logService = logService ?? DependencyService.Resolve <ILogService>(); this.networkService = networkService ?? DependencyService.Resolve <INetworkService>(); uiDispatcher = uiDispatcher ?? DependencyService.Resolve <IUiDispatcher>(); imageCacheService = imageCacheService ?? DependencyService.Resolve <IImageCacheService>(); this.AcceptCommand = new Command(async _ => await Accept()); this.DeclineCommand = new Command(async _ => await Decline()); this.IgnoreCommand = new Command(async _ => await Ignore()); this.Photos = new ObservableCollection <ImageSource>(); this.photosLoader = new PhotosLoader(logService, this.networkService, this.neuronService, uiDispatcher, imageCacheService, this.Photos); }
/// <summary> /// Creates a new instance of the <see cref="ChooseAccountViewModel"/> class. /// </summary> /// <param name="tagProfile">The tag profile to work with.</param> /// <param name="uiDispatcher">The UI dispatcher for alerts.</param> /// <param name="neuronService">The Neuron service for XMPP communication.</param> /// <param name="navigationService">The navigation service to use for app navigation</param> /// <param name="settingsService">The settings service for persisting UI state.</param> /// <param name="cryptoService">The crypto service to use for password generation.</param> /// <param name="networkService">The network service for network access.</param> /// <param name="logService">The log service.</param> public ChooseAccountViewModel( ITagProfile tagProfile, IUiDispatcher uiDispatcher, INeuronService neuronService, INavigationService navigationService, ISettingsService settingsService, ICryptoService cryptoService, INetworkService networkService, ILogService logService) : base(RegistrationStep.Account, tagProfile, uiDispatcher, neuronService, navigationService, settingsService, logService) { this.cryptoService = cryptoService; this.networkService = networkService; this.PerformActionCommand = new Command(async _ => await PerformAction(), _ => CanPerformAction()); this.ActionButtonText = AppResources.CreateNew; this.CreateNew = true; this.Mode = AccountMode.Create; this.CreateRandomPassword = true; this.SwitchModeCommand = new Command(_ => CreateNew = !CreateNew, _ => !IsBusy); this.Title = AppResources.ChooseAccount; }
/// <summary> /// Creates an instance of the <see cref="NewContractViewModel"/> class. /// For unit tests. /// <param name="tagProfile">The tag profile to work with.</param> /// <param name="logService">The log service.</param> /// <param name="neuronService">The Neuron service for XMPP communication.</param> /// <param name="uiDispatcher">The UI dispatcher for alerts.</param> /// <param name="navigationService">The navigation service to use for app navigation</param> /// <param name="settingsService">The settings service for persisting UI state.</param> /// <param name="contractOrchestratorService">The service to use for contract orchestration.</param> /// </summary> protected internal NewContractViewModel( ITagProfile tagProfile, ILogService logService, INeuronService neuronService, IUiDispatcher uiDispatcher, INavigationService navigationService, ISettingsService settingsService, IContractOrchestratorService contractOrchestratorService) { this.tagProfile = tagProfile ?? DependencyService.Resolve <ITagProfile>(); this.logService = logService ?? DependencyService.Resolve <ILogService>(); this.neuronService = neuronService ?? DependencyService.Resolve <INeuronService>(); this.uiDispatcher = uiDispatcher ?? DependencyService.Resolve <IUiDispatcher>(); this.navigationService = navigationService ?? DependencyService.Resolve <INavigationService>(); this.settingsService = settingsService ?? DependencyService.Resolve <ISettingsService>(); this.contractOrchestratorService = contractOrchestratorService ?? DependencyService.Resolve <IContractOrchestratorService>(); this.ContractVisibilityItems = new ObservableCollection <ContractVisibilityModel>(); this.AvailableRoles = new ObservableCollection <string>(); this.ProposeCommand = new Command(async _ => await this.Propose(), _ => this.CanPropose()); this.partsToAdd = new Dictionary <string, string>(); }
/// <summary> /// Creates an instance of the <see cref="ViewIdentityViewModel"/> class. /// </summary> public ViewIdentityViewModel( ITagProfile tagProfile, IUiDispatcher uiDispatcher, INeuronService neuronService, INavigationService navigationService, INetworkService networkService, ILogService logService, IImageCacheService imageCacheService) : base(neuronService, uiDispatcher) { this.tagProfile = tagProfile; this.logService = logService; this.navigationService = navigationService; this.networkService = networkService; imageCacheService = imageCacheService ?? DependencyService.Resolve <IImageCacheService>(); this.ApproveCommand = new Command(async _ => await Approve(), _ => IsConnected); this.RejectCommand = new Command(async _ => await Reject(), _ => IsConnected); this.RevokeCommand = new Command(async _ => await Revoke(), _ => IsConnected); this.CompromiseCommand = new Command(async _ => await Compromise(), _ => IsConnected); this.Photos = new ObservableCollection <ImageSource>(); this.photosLoader = new PhotosLoader(this.logService, this.networkService, this.NeuronService, this.UiDispatcher, imageCacheService, this.Photos); this.CopyCommand = new Command(_ => this.CopyHtmlToClipboard()); }
public ToDoExplorerViewModel( RubberduckParserState state, IGeneralConfigService configService, ISettingsFormFactory settingsFormFactory, ISelectionService selectionService, IUiDispatcher uiDispatcher) { _state = state; _configService = configService; _settingsFormFactory = settingsFormFactory; _uiDispatcher = uiDispatcher; _state.StateChanged += HandleStateChanged; NavigateCommand = new NavigateCommand(selectionService); RemoveCommand = new DelegateCommand(LogManager.GetCurrentClassLogger(), ExecuteRemoveCommand, CanExecuteRemoveCommand); CollapseAllCommand = new DelegateCommand(LogManager.GetCurrentClassLogger(), ExecuteCollapseAll); ExpandAllCommand = new DelegateCommand(LogManager.GetCurrentClassLogger(), ExecuteExpandAll); CopyResultsCommand = new DelegateCommand(LogManager.GetCurrentClassLogger(), ExecuteCopyResultsCommand, CanExecuteCopyResultsCommand); OpenTodoSettingsCommand = new DelegateCommand(LogManager.GetCurrentClassLogger(), ExecuteOpenTodoSettingsCommand); Items = CollectionViewSource.GetDefaultView(_items); OnPropertyChanged(nameof(Items)); Grouping = ToDoItemGrouping.Marker; }
public AnnotateParentMenu(IEnumerable <IMenuItem> items, IUiDispatcher dispatcher) : base(dispatcher, "AnnotateMenu", items) { }
public RubberduckParentMenu(IEnumerable <IMenuItem> items, int beforeIndex, IUiDispatcher dispatcher) : base(dispatcher, "RubberduckMenu", items, beforeIndex) { }
public ProjectWindowContextParentMenu(IEnumerable <IMenuItem> items, int beforeIndex, IUiDispatcher dispatcher) : base(dispatcher, "RubberduckMenu", items, beforeIndex) { }
public TestNeuronViewModel(INeuronService neuronService, IUiDispatcher uiDispatcher) : base(neuronService, uiDispatcher) { }
private static FindAllImplementationsService ArrangeFindAllImplementationsService(RubberduckParserState state, ISearchResultsWindowViewModel viewModel, INavigateCommand navigateCommand = null, IMessageBox messageBox = null, SearchResultPresenterInstanceManager presenterService = null, IUiDispatcher uiDispatcher = null) { return(new FindAllImplementationsService( navigateCommand ?? new Mock <INavigateCommand>().Object, messageBox ?? new Mock <IMessageBox>().Object, state, viewModel, presenterService, uiDispatcher ?? new Mock <IUiDispatcher>().Object)); }
public CodePaneRefactoringsParentMenu(IEnumerable <IMenuItem> items, IUiDispatcher dispatcher) : base(dispatcher, "RubberduckMenu_CodePaneRefactor", items) { }
public TestContentBasePage(ILogService logService, ISettingsService settingsService, IUiDispatcher uiDispatcher) : base(logService, settingsService, uiDispatcher) { }
public ParserState() { UiContextProvider.Initialize(); _dispatcher = new UiDispatcher(UiContextProvider.Instance()); }
public ToolsParentMenu(IEnumerable <IMenuItem> items, IUiDispatcher dispatcher) : base(dispatcher, "ToolsMenu", items) { }
public InspectionResultsViewModel( RubberduckParserState state, IInspector inspector, IQuickFixProvider quickFixProvider, INavigateCommand navigateCommand, ReparseCommand reparseCommand, IClipboardWriter clipboard, IWebNavigator web, IConfigurationService <Configuration> configService, ISettingsFormFactory settingsFormFactory, IUiDispatcher uiDispatcher) { _web = web; _state = state; _inspector = inspector; _quickFixProvider = quickFixProvider; NavigateCommand = navigateCommand; _clipboard = clipboard; _configService = configService; _settingsFormFactory = settingsFormFactory; _uiDispatcher = uiDispatcher; RefreshCommand = new DelegateCommand(LogManager.GetCurrentClassLogger(), o => { IsBusy = true; _forceRefreshResults = true; var cancellation = new ReparseCancellationFlag(); reparseCommand.Execute(cancellation); if (cancellation.Canceled) { IsBusy = false; } }, o => !IsBusy && reparseCommand.CanExecute(o)); DisableInspectionCommand = new DelegateCommand(LogManager.GetCurrentClassLogger(), ExecuteDisableInspectionCommand); QuickFixCommand = new DelegateCommand(LogManager.GetCurrentClassLogger(), ExecuteQuickFixCommand, CanExecuteQuickFixCommand); QuickFixSelectedItemsCommand = new DelegateCommand(LogManager.GetCurrentClassLogger(), ExecuteQuickFixForSelection, CanExecuteQuickFixForSelection); QuickFixInProcedureCommand = new DelegateCommand(LogManager.GetCurrentClassLogger(), ExecuteQuickFixInProcedureCommand, CanExecuteQuickFixInProcedure); QuickFixInModuleCommand = new DelegateCommand(LogManager.GetCurrentClassLogger(), ExecuteQuickFixInModuleCommand, CanExecuteQuickFixInModule); QuickFixInProjectCommand = new DelegateCommand(LogManager.GetCurrentClassLogger(), ExecuteQuickFixInProjectCommand, CanExecuteQuickFixInProject); QuickFixInAllProjectsCommand = new DelegateCommand(LogManager.GetCurrentClassLogger(), ExecuteQuickFixInAllProjectsCommand, CanExecuteQuickFixAll); CopyResultsCommand = new DelegateCommand(LogManager.GetCurrentClassLogger(), ExecuteCopyResultsCommand, CanExecuteCopyResultsCommand); OpenInspectionSettings = new DelegateCommand(LogManager.GetCurrentClassLogger(), OpenSettings); CollapseAllCommand = new DelegateCommand(LogManager.GetCurrentClassLogger(), ExecuteCollapseAll); ExpandAllCommand = new DelegateCommand(LogManager.GetCurrentClassLogger(), ExecuteExpandAll); OpenInspectionDetailsPageCommand = new DelegateCommand(LogManager.GetCurrentClassLogger(), ExecuteOpenInspectionDetailsPageCommand); QuickFixCommands = new List <(ICommand command, string key, Func <IQuickFix, bool> visibility)> { (QuickFixCommand, "QuickFix_Instance", quickFix => true), (QuickFixSelectedItemsCommand, "QuickFix_Selection", quickFix => quickFix.CanFixMultiple), (QuickFixInProcedureCommand, "QuickFix_ThisProcedure", quickFix => quickFix.CanFixInProcedure), (QuickFixInModuleCommand, "QuickFix_ThisModule", quickFix => quickFix.CanFixInModule), (QuickFixInProjectCommand, "QuickFix_ThisProject", quickFix => quickFix.CanFixInProject), (QuickFixInAllProjectsCommand, "QuickFix_All", quickFix => quickFix.CanFixAll) }; _configService.SettingsChanged += _configService_SettingsChanged; // todo: remove I/O work in constructor _runInspectionsOnReparse = _configService.Read().UserSettings.CodeInspectionSettings.RunInspectionsOnSuccessfulParse; if (CollectionViewSource.GetDefaultView(_results) is ListCollectionView results) { results.Filter = inspection => InspectionFilter((IInspectionResult)inspection); results.CustomSort = this; Results = results; } OnPropertyChanged(nameof(Results)); Grouping = InspectionResultGrouping.Type; _state.StateChanged += HandleStateChanged; }