예제 #1
0
        /// <summary>
        /// Creates the <see cref="IJobResultsHandler"/> represented by the
        /// settings within this <see cref="PostProcessingOptions"/>.
        /// </summary>
        /// <returns>A <see cref="IJobResultsHandler"/> represented by the properties
        /// within this <see cref="PostProcessingOptions"/></returns>
        public override IJobResultsHandler CreateHandler()
        {
            CompositeHandler h = new CompositeHandler();

            foreach (IJobResultsHandler handler in ChosenHandlers.Select(x => x.Handler))
            {
                h.Add(handler);
            }

            return(h);
        }
예제 #2
0
 /// <summary>
 /// Performs the RemoveHandler.Execute logic
 /// </summary>
 /// <param name="parameter">N/A</param>
 private void _removeSelectedHandler(object parameter)
 {
     ChosenHandlers.Remove(SelectedHandler);
 }
예제 #3
0
 /// <summary>
 /// Occurs when the contents of the ChosenHandlers collection is
 /// modified
 /// </summary>
 /// <param name="sender">N/A</param>
 /// <param name="e">N/A</param>
 private void _chosenHandlersChanged(object sender, NotifyCollectionChangedEventArgs e)
 {
     IsValid = ChosenHandlers.Any();
 }
예제 #4
0
 /// <summary>
 /// Performs the RemoveHandler.CanExecute logic
 /// </summary>
 /// <param name="parameter">N/A</param>
 /// <returns>true if the currently selected handler is within the
 /// chosen handlers set</returns>
 private bool _canExecuteRemoveHandler(object parameter)
 {
     return(SelectedHandler != null &&
            ChosenHandlers.Contains(SelectedHandler));
 }