コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }