public BridgeUpdater GetReplaceUpdater(IJsCsGlue glue, int index) { var bridgeUpdater = new BridgeUpdater(viewModelUpdater => Splice(viewModelUpdater, index, 1, glue)); var old = ReplaceAndReturnOld(index, glue.AddRef()); return(bridgeUpdater.CheckForRemove(old)); }
public BridgeUpdater GetReplaceUpdater(IJsCsGlue glue, int index) { var bridgeUpdater = new BridgeUpdater(viewModelUpdater => Splice(viewModelUpdater, index, 1, glue)); var old = Items[index]; Items[index] = glue.AddRef(); return(CheckForRemove(bridgeUpdater, old)); }
private BridgeUpdater GetUnrootedEntitiesUpdater(IJsCsGlue newBridgeChild, Action <IJsCsGlue> performAfterBuild) { _UnrootedEntities.Add(newBridgeChild.AddRef()); return(new BridgeUpdater(updater => { updater.InjectDetached(newBridgeChild.GetJsSessionValue()); performAfterBuild(newBridgeChild); })); }
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 }); }
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 GetAddUpdater(IJsCsGlue glue, int index) { Items.Insert(index, glue); glue.AddRef(); return(new BridgeUpdater(viewModelUpdater => Splice(viewModelUpdater, index, 0, glue))); }
private BridgeUpdater GetUnrootedEntitiesUpdater(IJsCsGlue newbridgedchild, Action <IJsCsGlue> performAfterBuild) { _UnrootedEntities.Add(newbridgedchild.AddRef()); return(new BridgeUpdater(_ => performAfterBuild(newbridgedchild))); }