private UpdateInformation PrivateUpdateGlueProperty(AttibuteUpdater attributeDescription, IJsCsGlue glue)
        {
            var oldGlue = attributeDescription.Child;
            var index   = _TypePropertyAccessor.GetIndex(attributeDescription.PropertyAccessor);

            _Attributes.Apply(index, glue.AddRef());
            return(new UpdateInformation {
                AddedProperty = index.Insert, ToBeCleaned = (oldGlue?.Release() == true) ? oldGlue : null
            });
        }
        public BridgeUpdater GetUpdater(AttibuteUpdater propertyUpdater, IJsCsGlue glue)
        {
            var update = PrivateUpdateGlueProperty(propertyUpdater, glue);

            BridgeUpdater updater;

            if (!update.AddedProperty)
            {
                updater = new BridgeUpdater(viewModelUpdater => viewModelUpdater.UpdateProperty(CachableJsValue,
                                                                                                propertyUpdater.PropertyName, glue.GetJsSessionValue(), !glue.IsBasic()));
            }
            else
            {
                updater = new BridgeUpdater(viewModelUpdater => viewModelUpdater.AddProperty(CachableJsValue,
                                                                                             propertyUpdater.PropertyName, glue.GetJsSessionValue()));
            }

            return(updater.Remove(update.ToBeCleaned));
        }
 internal IJsCsGlue UpdateGlueProperty(AttibuteUpdater attributeDescription, IJsCsGlue glue)
 {
     return(PrivateUpdateGlueProperty(attributeDescription, glue).ToBeCleaned);
 }