/// <summary>
 /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
 /// </summary>
 public void Dispose()
 {
     if (monitor != null)
     {
         monitor.Dispose();
     }
 }
Esempio n. 2
0
        private void HookSubpathMonitor()
        {
            if (_subPathMonitor != null)
            {
                _subPathMonitor.Dispose();
            }

            if (string.IsNullOrEmpty(_subPath))
            {
                return;
            }

            var getter = GetPropertyGetMethod();

            var subTarget = getter.Invoke(GetTargetOrFail()) as INotifyPropertyChanged;

            if (subTarget != null)
            {
                _subPathMonitor = new PropertyPathMonitor(_methodFactory, subTarget, _subPath, Notify);
            }
        }
Esempio n. 3
0
        void HookSubpathMonitor()
        {
            if (subPathMonitor != null)
            {
                subPathMonitor.Dispose();
            }

            if (string.IsNullOrEmpty(subPath))
            {
                return;
            }

            var getter = GetPropertyGetMethod();

            var subTarget = getter.Invoke(GetNotifier(true)) as INotifyPropertyChanged;

            if (subTarget != null)
            {
                subPathMonitor = new PropertyPathMonitor(methodFactory, subTarget, subPath, this);
            }
        }