public void UpdateEventArgsFromJavascript(CollectionChanges.CollectionChanges collectionChanges) { var list = CValue as IList; if (list == null) { return; } collectionChanges.IndividualChanges.ForEach(c => ReplayChanges(c, list)); }
public BridgeUpdater UpdateCollectionFromFromJavascriptChanges(CollectionChanges.CollectionChanges collectionChanges) { if (!(CValue is IList list)) { return(null); } collectionChanges.IndividualChanges.ForEach(c => ReplayChanges(c, list)); collectionChanges.GetGlues(CollectionChangeType.Add).ForEach(glue => glue.AddRef()); return(new BridgeUpdater().CheckForRemove(collectionChanges.GetGlues(CollectionChangeType.Remove))); }
public void UpdateEventArgsFromJavascript(CollectionChanges.CollectionChanges collectionChanges, BridgeUpdater updater) { if (!(CValue is IList list)) { return; } collectionChanges.IndividualChanges.ForEach(c => ReplayChanges(c, list)); collectionChanges.IndividualChanges.Where(ch => ch.CollectionChangeType == CollectionChangeType.Add) .ForEach(ch => ch.Object.AddRef()); collectionChanges.IndividualChanges.Where(ch => ch.CollectionChangeType == CollectionChangeType.Remove) .ForEach(ch => CheckForRemove(updater, ch.Object)); }
private BridgeUpdater UpdateCollectionAfterJavascriptChanges(JsArray array, object collection, CollectionChanges.CollectionChanges change) { var updater = default(BridgeUpdater); try { using (_CSharpChangesListener.GetCollectionSilenter(collection)) { updater = array.UpdateCollectionFromFromJavascriptChanges(change); } _JsUpdateHelper.UpdateOnUiContext(updater, _CSharpChangesListener.Off); } catch (Exception exception) { LogJavascriptSetException(exception); } return(updater); }