private UpdateInformation PrivateUpdateGlueProperty(AttributeUpdater attributeDescription, IJsCsGlue glue) { var oldGlue = attributeDescription.Child; var index = _TypePropertyAccessor.GetIndex(attributeDescription.PropertyAccessor); _Attributes.Apply(index, glue.AddRef()); return(new UpdateInformation { AddedProperty = index.Insert, OldReference = oldGlue }); }
public BridgeUpdater GetUpdaterChangeOnCSharpContext(AttributeUpdater 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.CheckForRemove(update.OldReference)); }
internal BridgeUpdater GetUpdaterChangeOnJsContext(AttributeUpdater attributeDescription, IJsCsGlue glue) { var context = PrivateUpdateGlueProperty(attributeDescription, glue); return(new BridgeUpdater().CheckForRemove(context.OldReference)); }