Пример #1
0
 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;
 }
Пример #2
0
        private void CacheGlobal(IJavascriptObject jsobject, IJSCSMappedBridge ibo)
        {
            var id = jsobject.GetID();

            if (id == 0)
            {
                return;
            }

            ibo.SetJsId(id);
            _FromJavascript_Global[id] = ibo;
        }
Пример #3
0
 internal static void AutoMap(this IJSCSMappedBridge @this)
 {
     @this.SetMappedJSValue(@this.JSValue);
 }
Пример #4
0
 internal void Update(IJSCSMappedBridge observableBridge, IJavascriptObject jsobject)
 {
     observableBridge.SetMappedJSValue(jsobject);
     CacheGlobal(jsobject, observableBridge);
 }
Пример #5
0
 public IJavascriptObjectInternalMapper GetMapper(IJSCSMappedBridge root)
 {
     return(new JavascriptMapper(root, Update, RegisterMapping, RegisterCollectionMapping));
 }