public AttachToProcessViewModel( IRemoteProcessService remoteProcessService, IRemoteProcessCommandService remoteProcessCommandService) { Contract.Requires <ArgumentNullException>(remoteProcessService != null); Contract.Requires <ArgumentNullException>(remoteProcessCommandService != null); this.remoteProcessService = remoteProcessService; this.remoteProcessCommandService = remoteProcessCommandService; this.remoteProcesses = this.remoteProcessService.GetAll(); this.selectedItems = new BindableCollection <IRemoteProcess>(); this.selectedItems.CollectionChanged += (sender, args) => this.NotifyOfPropertyChange(() => this.CanAttach); }
public AttachToProcessViewModel( IRemoteProcessService remoteProcessService, IRemoteProcessCommandService remoteProcessCommandService) { Contract.Requires<ArgumentNullException>(remoteProcessService != null); Contract.Requires<ArgumentNullException>(remoteProcessCommandService != null); this.remoteProcessService = remoteProcessService; this.remoteProcessCommandService = remoteProcessCommandService; this.remoteProcesses = this.remoteProcessService.GetAll(); this.selectedItems = new BindableCollection<IRemoteProcess>(); this.selectedItems.CollectionChanged += (sender, args) => this.NotifyOfPropertyChange(() => this.CanAttach); }