コード例 #1
0
        public void MasterDetailsVM_SubVMDisposing()
        {
            object subVM          = null;
            bool   subVMDisposing = false;

            _masterVM.SubVMDisposing += (sender, e) => { subVM = sender; subVMDisposing = true; };

            var vmController = new VMController(_response.Handler);

            vmController.OnRequestVM("conn1", $"{nameof(MasterVM)}.{nameof(DetailsVM)}");

            vmController.OnDisposeVM("conn1", $"{nameof(MasterVM)}.{nameof(DetailsVM)}");
            Assert.IsTrue(subVMDisposing);
            Assert.IsTrue(subVM is DetailsVM);
        }
コード例 #2
0
 public void DisposeVM(string vmId = null)
 {
     _vmController.OnDisposeVM("conn1", vmId ?? _vmId);
 }
コード例 #3
0
 public void DisposeVM(string vmId = null)
 {
     _vmController.OnDisposeVM(_connectionId, vmId ?? _vmId);
 }