Esempio n. 1
0
        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));
        }
Esempio n. 2
0
        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);
     }));
 }
Esempio n. 4
0
        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
            });
        }
Esempio n. 6
0
 public BridgeUpdater GetAddUpdater(IJsCsGlue glue, int index)
 {
     Items.Insert(index, glue);
     glue.AddRef();
     return(new BridgeUpdater(viewModelUpdater => Splice(viewModelUpdater, index, 0, glue)));
 }
Esempio n. 7
0
 private BridgeUpdater GetUnrootedEntitiesUpdater(IJsCsGlue newbridgedchild, Action <IJsCsGlue> performAfterBuild)
 {
     _UnrootedEntities.Add(newbridgedchild.AddRef());
     return(new BridgeUpdater(_ => performAfterBuild(newbridgedchild)));
 }