Esempio n. 1
0
        private bool disposedValue = false; // To detect redundant calls

        protected virtual void Dispose(bool disposing)
        {
            if (!disposedValue)
            {
                if (disposing)
                {
                    // TODO: dispose managed state (managed objects).
                    if (_rootListener != null)
                    {
                        _rootListener.Dispose();
                    }
                    _pathListeners.Clear();

                    _ourNode = null;
                    _storeNodeUpdateReceiver_PropBag  = null;
                    _storeNodeUpdateReceiver_PropNode = null;
                    _storeNodeUpdateReceiver_Value    = null;
                }

                // TODO: free unmanaged resources (unmanaged objects) and override a finalizer below.
                // TODO: set large fields to null.

                disposedValue = true;
            }
        }
Esempio n. 2
0
        //Lazy<IValueConverter> _defaultConverter;
        //public virtual Lazy<IValueConverter> DefaultConverter
        //{
        //    get
        //    {
        //        if(_defaultConverter == null)
        //        {
        //            return new Lazy<IValueConverter>(() => new PropValueConverter());
        //        }
        //        return _defaultConverter;
        //    }
        //    set
        //    {
        //        _defaultConverter = value;
        //    }
        //}

        //Func<BindingTarget, MyBindingInfo, Type, string, object> _defConvParamBuilder;
        //public virtual Func<BindingTarget, MyBindingInfo, Type, string, object> DefaultConverterParameterBuilder
        //{
        //    get
        //    {
        //        if (_defConvParamBuilder == null)
        //        {
        //            return OurDefaultConverterParameterBuilder;
        //        }
        //        return _defConvParamBuilder;
        //    }
        //    set
        //    {
        //        _defConvParamBuilder = value;
        //    }
        //}
        #endregion

        #region Constructor

        // PropBag
        internal LocalWatcher
        (
            PSAccessServiceInterface propStoreAccessService,
            LocalBindingInfo bindingInfo,
            IReceivePropStoreNodeUpdates_PropBag <T> storeNodeUpdateReceiver_PropBag
        ) : this(propStoreAccessService, bindingInfo)
        {
            _storeNodeUpdateReceiver_PropBag = storeNodeUpdateReceiver_PropBag;
            _notificationKind = PropStoreNotificationKindEnum.PropBag;

            _isComplete = StartBinding(_pathElements, _pathListeners, _isPathAbsolute, out _sourcePropNode);
        }
Esempio n. 3
0
 // PropBag (Parent of PropItem) -- no old value.
 private bool NotifyReceiver(IReceivePropStoreNodeUpdates_PropBag <T> propStoreUpdateReceiver, WeakRefKey <IPropBag> propItemParent)
 {
     propStoreUpdateReceiver.OnPropStoreNodeUpdated(propItemParent);
     return(true);
 }