private static void CheckSelectedItem(FilteredItemContainer item)
 {
     if (item != null)
     {
         item.ToggleCheck();
     }
 }
 public void InitializeContext()
 {
     this.item = Mock.Of <IItemContainer>(i =>
                                          i.Items == Enumerable.Empty <IItemContainer>());
     this.filter = Mock.Of <IPickerFilter>(pf =>
                                           pf.ApplyFilter(this.item) == false &&
                                           pf.MatchesFilter(this.item) == false);
     this.container = new FilteredItemContainer(this.item, this.filter);
 }
        /// <summary>
        /// Creates a new instance of the <see cref="SolutionPickerViewModel"/> class.
        /// </summary>
        public SolutionPickerBaseViewModel(FilteredItemContainer root, IPickerFilter filter)
        {
            Guard.NotNull(() => root, root);
            Guard.NotNull(() => filter, filter);

            this.Filter = filter;
            this.Items  = (this.Filter.ApplyFilter(root.Item)) ? new[] { root } : Enumerable.Empty <FilteredItemContainer>();

            this.InitializeCommands();
        }
 public void InitializeContext()
 {
     this.item = Mock.Of <IItemContainer>(i =>
                                          i.Items == Enumerable.Empty <IItemContainer>() &&
                                          i.Icon == System.Drawing.SystemIcons.Application);
     this.filter = Mock.Of <IPickerFilter>(pf =>
                                           pf.ApplyFilter(this.item) == false &&
                                           pf.MatchesFilter(this.item) == true);
     this.container = new FilteredItemContainer(this.item, this.filter);
 }
 public void InitializeContext()
 {
     this.childItem = Mock.Of <IItemContainer>();
     this.item      = Mock.Of <IItemContainer>(i =>
                                               i.Items == new[] { this.childItem });
     this.filter = Mock.Of <IPickerFilter>(pf =>
                                           pf.ApplyFilter(this.childItem) == true &&
                                           pf.MatchesFilter(this.childItem) == true);
     this.container = new FilteredItemContainer(this.item, this.filter);
 }
        /// <summary>
        /// Creates a new instance of the <see cref="SolutionPickerViewModel"/> class.
        /// </summary>
        public SolutionPickerBaseViewModel(FilteredItemContainer root, IPickerFilter filter)
        {
            Guard.NotNull(() => root, root);
            Guard.NotNull(() => filter, filter);

            this.Filter = filter;
            this.Items = (this.Filter.ApplyFilter(root.Item)) ? new[] { root } : Enumerable.Empty<FilteredItemContainer>();

            this.InitializeCommands();
        }
 /// <summary>
 /// Creates a new instance of the <see cref="SolutionSelectorViewModel"/> class.
 /// </summary>
 public SolutionSelectorViewModel(FilteredItemContainer root, IPickerFilter filter)
     : base(root, filter)
 {
 }
 private static void CheckSelectedItem(FilteredItemContainer item)
 {
     if (item != null)
     {
         item.ToggleCheck();
     }
 }
 private static bool CanCheckSelectedItem(FilteredItemContainer item)
 {
     return (item != null && item.IsSelectable);
 }
 public void InitializeContext()
 {
     this.filter    = Mock.Of <IPickerFilter>(pf => pf.ApplyFilter(this.solution) == true);
     this.root      = new FilteredItemContainer(this.solution, filter);
     this.viewModel = new SolutionPickerViewModel(this.root, filter);
 }
 /// <summary>
 /// Creates a new instance of the <see cref="SolutionPickerViewModel"/> class.
 /// </summary>
 public SolutionPickerViewModel(FilteredItemContainer root, IPickerFilter filter)
     : base(root, filter)
 {
 }
 private static bool CanCheckSelectedItem(FilteredItemContainer item)
 {
     return(item != null && item.IsSelectable);
 }