Esempio n. 1
0
        public void Reroot(string PropertyName, IJSCSGlue newValue)
        {
            _Attributes[PropertyName] = newValue;

            JSObject silenter = null;

            if (_Silenters.TryGetValue(PropertyName, out silenter))
            {
                silenter.InvokeAsync("silent", newValue.GetJSSessionValue());
            }
            else
            {
                WebCore.QueueWork(() =>
                {
                    var jso = (JSObject)_MappedJSValue;
                    if (!_Silenters.TryGetValue(PropertyName, out silenter))
                    {
                        silenter = (JSObject)jso[PropertyName];
                        _Silenters.Add(PropertyName, silenter);
                    }

                    silenter.Invoke("silent", newValue.GetJSSessionValue());
                });
            }
        }
Esempio n. 2
0
 public void Add(IJSCSGlue iIJSCBridge, int Index)
 {
     ((JSObject)MappedJSValue).InvokeAsync("silentsplice", new JSValue(Index), new JSValue(0), iIJSCBridge.GetJSSessionValue());
     if (Index > Items.Count - 1)
         Items.Add(iIJSCBridge);
     else
         Items.Insert(Index, iIJSCBridge);
 }
Esempio n. 3
0
        private async Task SetResult(IJavascriptObject promise, IJSCSGlue bridgevalue)
        {
            if (promise == null)
            {
                return;
            }

            await WebView.RunAsync(async() =>
            {
                await promise.InvokeAsync("fullfill", WebView, bridgevalue.GetJSSessionValue());
            });
        }
Esempio n. 4
0
        public void Reroot(string PropertyName, IJSCSGlue newValue)
        {
            _Attributes[PropertyName] = newValue;

            IJavascriptObject silenter = null;

            if (_Silenters.TryGetValue(PropertyName, out silenter))
            {
                silenter.InvokeAsync("silent", _CefV8Context, newValue.GetJSSessionValue());
            }
            else
            {
                _CefV8Context.RunAsync(() =>
                {
                    var jso = _MappedJSValue;
                    if (!_Silenters.TryGetValue(PropertyName, out silenter))
                    {
                        silenter = jso.GetValue(PropertyName);
                        _Silenters.Add(PropertyName, silenter);
                    }
                    silenter.Invoke("silent", _CefV8Context, newValue.GetJSSessionValue());
                });
            }
        }
Esempio n. 5
0
 public void Add(IJSCSGlue iIJSCBridge, int Index)
 {
     ((JSObject)MappedJSValue).InvokeAsync("silentsplice", new JSValue(Index), new JSValue(0), iIJSCBridge.GetJSSessionValue());
     if (Index > Items.Count - 1)
     {
         Items.Add(iIJSCBridge);
     }
     else
     {
         Items.Insert(Index, iIJSCBridge);
     }
 }
Esempio n. 6
0
 public void Insert(IJSCSGlue iIJSCBridge, int Index)
 {
     ((JSObject)MappedJSValue).InvokeAsync("silentsplice", new JSValue(Index), new JSValue(1), iIJSCBridge.GetJSSessionValue());
     Items[Index] = iIJSCBridge;
 }
Esempio n. 7
0
 private void Splice(IJavascriptViewModelUpdater viewModelUpdater, int index, int number, IJSCSGlue glue)
 {
     viewModelUpdater?.SpliceCollection(CachableJSValue, index, number, glue.GetJSSessionValue());
 }
        public void Reroot(string PropertyName, IJSCSGlue newValue)
        { 
            _Attributes[PropertyName]=newValue;

            JSObject silenter = null;
            if ( _Silenters.TryGetValue(PropertyName,out silenter))
            {
                silenter.InvokeAsync("silent", newValue.GetJSSessionValue());      
            }
            else
            {
                WebCore.QueueWork(() =>
                    {
                        var jso = (JSObject)_MappedJSValue;
                        if (!_Silenters.TryGetValue(PropertyName, out silenter))
                        {
                            silenter = (JSObject)jso[PropertyName];
                            _Silenters.Add(PropertyName, silenter);
                        }
              
                        silenter.Invoke("silent", newValue.GetJSSessionValue());
                    });
            }
        }     
Esempio n. 9
0
 private void Splice(int index, int number, IJSCSGlue glue)
 {
     ViewModelUpdater.SpliceCollection(MappedJSValue, index, number, glue.GetJSSessionValue());
 }
Esempio n. 10
0
 public void Add(IJSCSGlue iIJSCBridge, int Index)
 {
     MappedJSValue.InvokeAsync("silentsplice", _CefV8Context, CefV8Value.CreateInt(Index), CefV8Value.CreateInt(0), iIJSCBridge.GetJSSessionValue());
     if (Index > Items.Count - 1)
         Items.Add(iIJSCBridge);
     else
         Items.Insert(Index, iIJSCBridge);
 }
 public void ReRoot(string propertyName, IJSCSGlue glue)
 {
     UpdateCSharpProperty(propertyName, glue);
     ViewModelUpdater.UpdateProperty(_MappedJSValue, propertyName, glue.GetJSSessionValue());
 }    
Esempio n. 12
0
 public void ReRoot(string propertyName, IJSCSGlue glue)
 {
     UpdateCSharpProperty(propertyName, glue);
     ViewModelUpdater.UpdateProperty(_MappedJSValue, propertyName, glue.GetJSSessionValue());
 }
Esempio n. 13
0
 public void Insert(IJSCSGlue iIJSCBridge, int Index)
 {
     MappedJSValue.InvokeAsync("silentsplice", _IWebView, _IWebView.Factory.CreateInt(Index), _IWebView.Factory.CreateInt(1), iIJSCBridge.GetJSSessionValue());
     Items[Index] = iIJSCBridge;
 }
Esempio n. 14
0
 public void Add(IJSCSGlue iIJSCBridge, int Index)
 {
     MappedJSValue.InvokeAsync("silentsplice", _IWebView, _IWebView.Factory.CreateInt(Index), _IWebView.Factory.CreateInt(0), iIJSCBridge.GetJSSessionValue());
     if (Index > Items.Count - 1)
         Items.Add(iIJSCBridge);
     else
         Items.Insert(Index, iIJSCBridge);
 }
Esempio n. 15
0
 public void Insert(IJSCSGlue iIJSCBridge, int Index)
 {
     ((JSObject)MappedJSValue).InvokeAsync("silentsplice", new JSValue(Index), new JSValue(1), iIJSCBridge.GetJSSessionValue());
     Items[Index] = iIJSCBridge;
 }
Esempio n. 16
0
 private void Splice(int index, int number, IJSCSGlue glue)
 {
     ViewModelUpdater.SpliceCollection(MappedJSValue, index, number, glue.GetJSSessionValue());
 }
Esempio n. 17
0
 public void Insert(IJSCSGlue iIJSCBridge, int Index)
 {
     MappedJSValue.InvokeAsync("silentsplice", _IWebView, _IWebView.Factory.CreateInt(Index), _IWebView.Factory.CreateInt(1), iIJSCBridge.GetJSSessionValue());
     Items[Index] = iIJSCBridge;
 }
Esempio n. 18
0
 public void Insert(IJSCSGlue iIJSCBridge, int Index)
 {
     MappedJSValue.InvokeAsync("silentsplice", _CefV8Context, CefV8Value.CreateInt(Index), CefV8Value.CreateInt(1), iIJSCBridge.GetJSSessionValue());
     Items[Index] = iIJSCBridge;
 }
Esempio n. 19
0
 public void Add(IJSCSGlue iIJSCBridge, int Index)
 {
     MappedJSValue.InvokeAsync("silentsplice", _IWebView, _IWebView.Factory.CreateInt(Index), _IWebView.Factory.CreateInt(0), iIJSCBridge.GetJSSessionValue());
     if (Index > Items.Count - 1)
     {
         Items.Add(iIJSCBridge);
     }
     else
     {
         Items.Insert(Index, iIJSCBridge);
     }
 }
Esempio n. 20
0
        public void Reroot(string PropertyName, IJSCSGlue newValue)
        { 
            _Attributes[PropertyName]=newValue;

            CefV8Value silenter = null;
            if ( _Silenters.TryGetValue(PropertyName,out silenter))
            {
                silenter.InvokeAsync("silent", _CefV8Context, newValue.GetJSSessionValue());      
            }
            else
            {
                //WebCore.QueueWork(() =>
                //    {

                _CefV8Context.RunAsync( ()=>
                    {
                        var jso = _MappedJSValue;
                        if (!_Silenters.TryGetValue(PropertyName, out silenter))
                        {
                            silenter = jso.GetValue(PropertyName);
                            _Silenters.Add(PropertyName, silenter);
                        }
                        silenter.Invoke("silent", _CefV8Context, newValue.GetJSSessionValue());
                    });
            }
        }     
Esempio n. 21
0
 public BridgeUpdater GetUpdater(string propertyName, IJSCSGlue glue)
 {
     UpdateGlueProperty(propertyName, glue);
     return(new BridgeUpdater(viewModelUpdater => viewModelUpdater?.UpdateProperty(CachableJSValue, propertyName, glue.GetJSSessionValue(), !glue.IsBasic())));
 }