public JavascriptMapper(IJSCSMappedBridge root, Action <IJSCSMappedBridge, IJavascriptObject> update, Action <IJavascriptObject, string, IJavascriptObject> registerMapping, Action <IJavascriptObject, string, int, IJavascriptObject> registerCollectionMapping) { _Root = root; _Update = update; _RegisterMapping = registerMapping; _RegisterCollectionMapping = registerCollectionMapping; }
private void CacheGlobal(IJavascriptObject jsobject, IJSCSMappedBridge ibo) { var id = jsobject.GetID(); if (id == 0) { return; } ibo.SetJsId(id); _FromJavascript_Global[id] = ibo; }
internal static void AutoMap(this IJSCSMappedBridge @this) { @this.SetMappedJSValue(@this.JSValue); }
internal void Update(IJSCSMappedBridge observableBridge, IJavascriptObject jsobject) { observableBridge.SetMappedJSValue(jsobject); CacheGlobal(jsobject, observableBridge); }
public IJavascriptObjectInternalMapper GetMapper(IJSCSMappedBridge root) { return(new JavascriptMapper(root, Update, RegisterMapping, RegisterCollectionMapping)); }