コード例 #1
0
ファイル: JSArray.cs プロジェクト: mustafaasaber/Neutronium
        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));
        }
コード例 #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));
        }
コード例 #3
0
 private BridgeUpdater GetUnrootedEntitiesUpdater(IJsCsGlue newBridgeChild, Action <IJsCsGlue> performAfterBuild)
 {
     _UnrootedEntities.Add(newBridgeChild.AddRef());
     return(new BridgeUpdater(updater =>
     {
         updater.InjectDetached(newBridgeChild.GetJsSessionValue());
         performAfterBuild(newBridgeChild);
     }));
 }
コード例 #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
            });
        }
コード例 #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
            });
        }
コード例 #6
0
 public BridgeUpdater GetAddUpdater(IJsCsGlue glue, int index)
 {
     Items.Insert(index, glue);
     glue.AddRef();
     return(new BridgeUpdater(viewModelUpdater => Splice(viewModelUpdater, index, 0, glue)));
 }
コード例 #7
0
 private BridgeUpdater GetUnrootedEntitiesUpdater(IJsCsGlue newbridgedchild, Action <IJsCsGlue> performAfterBuild)
 {
     _UnrootedEntities.Add(newbridgedchild.AddRef());
     return(new BridgeUpdater(_ => performAfterBuild(newbridgedchild)));
 }