Ejemplo 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));
        }
Ejemplo 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);
     }));
 }
Ejemplo 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
            });
        }
Ejemplo n.º 5
0
        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
            });
        }
Ejemplo 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)));
 }
Ejemplo n.º 7
0
 private BridgeUpdater GetUnrootedEntitiesUpdater(IJsCsGlue newbridgedchild, Action <IJsCsGlue> performAfterBuild)
 {
     _UnrootedEntities.Add(newbridgedchild.AddRef());
     return(new BridgeUpdater(_ => performAfterBuild(newbridgedchild)));
 }