private BridgeUpdater GetUnrootedEntitiesUpdater(IJsCsGlue newBridgeChild, Action <IJsCsGlue> performAfterBuild) { _UnrootedEntities.Add(newBridgeChild.AddRef()); return(new BridgeUpdater(updater => { updater.InjectDetached(newBridgeChild.GetJsSessionValue()); performAfterBuild(newBridgeChild); })); }
private async void SetResult(IJavascriptObject promise, IJsCsGlue bridgevalue) { if (promise == null) { return; } await WebView.RunAsync(async() => { await promise.InvokeAsync("fullfill", WebView, bridgevalue.GetJsSessionValue()); }); }
public BridgeUpdater GetUpdaterChangeOnCSharpContext(AttributeUpdater propertyUpdater, IJsCsGlue glue) { var update = PrivateUpdateGlueProperty(propertyUpdater, glue); BridgeUpdater updater; if (!update.AddedProperty) { updater = new BridgeUpdater(viewModelUpdater => viewModelUpdater.UpdateProperty(CachableJsValue, propertyUpdater.PropertyName, glue.GetJsSessionValue(), !glue.IsBasic())); } else { updater = new BridgeUpdater(viewModelUpdater => viewModelUpdater.AddProperty(CachableJsValue, propertyUpdater.PropertyName, glue.GetJsSessionValue())); } return(updater.CheckForRemove(update.OldReference)); }
private void Splice(IJavascriptViewModelUpdater viewModelUpdater, int index, int number, IJsCsGlue glue) { viewModelUpdater?.SpliceCollection(CachableJsValue, index, number, glue.GetJsSessionValue()); }
private void OnExit(IJsCsGlue exiting) { exiting.ApplyOnListenable(_ListenerRegister.Off); exiting.GetJsSessionValue().Dispose(); }
public BridgeUpdater GetUpdater(AttibuteUpdater propertyUpdater, IJsCsGlue glue) { var update = PrivateUpdateGlueProperty(propertyUpdater, glue); BridgeUpdater updater; if (!update.AddedProperty) { updater = new BridgeUpdater(viewModelUpdater => viewModelUpdater.UpdateProperty(CachableJsValue, propertyUpdater.PropertyName, glue.GetJsSessionValue(), !glue.IsBasic())); } else { updater = new BridgeUpdater(viewModelUpdater => viewModelUpdater.AddProperty(CachableJsValue, propertyUpdater.PropertyName, glue.GetJsSessionValue())); } return(updater.Remove(update.ToBeCleaned)); }