Пример #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());
                });
            }
        }
Пример #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);
 }
Пример #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());
            });
        }
Пример #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());
                });
            }
        }
Пример #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);
     }
 }
Пример #6
0
 public void Insert(IJSCSGlue iIJSCBridge, int Index)
 {
     ((JSObject)MappedJSValue).InvokeAsync("silentsplice", new JSValue(Index), new JSValue(1), iIJSCBridge.GetJSSessionValue());
     Items[Index] = iIJSCBridge;
 }
Пример #7
0
 private void Splice(IJavascriptViewModelUpdater viewModelUpdater, int index, int number, IJSCSGlue glue)
 {
     viewModelUpdater?.SpliceCollection(CachableJSValue, index, number, glue.GetJSSessionValue());
 }
Пример #8
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());
                    });
            }
        }     
Пример #9
0
 private void Splice(int index, int number, IJSCSGlue glue)
 {
     ViewModelUpdater.SpliceCollection(MappedJSValue, index, number, glue.GetJSSessionValue());
 }
Пример #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);
 }
Пример #11
0
 public void ReRoot(string propertyName, IJSCSGlue glue)
 {
     UpdateCSharpProperty(propertyName, glue);
     ViewModelUpdater.UpdateProperty(_MappedJSValue, propertyName, glue.GetJSSessionValue());
 }    
Пример #12
0
 public void ReRoot(string propertyName, IJSCSGlue glue)
 {
     UpdateCSharpProperty(propertyName, glue);
     ViewModelUpdater.UpdateProperty(_MappedJSValue, propertyName, glue.GetJSSessionValue());
 }
Пример #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;
 }
Пример #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);
 }
Пример #15
0
 public void Insert(IJSCSGlue iIJSCBridge, int Index)
 {
     ((JSObject)MappedJSValue).InvokeAsync("silentsplice", new JSValue(Index), new JSValue(1), iIJSCBridge.GetJSSessionValue());
     Items[Index] = iIJSCBridge;
 }
Пример #16
0
 private void Splice(int index, int number, IJSCSGlue glue)
 {
     ViewModelUpdater.SpliceCollection(MappedJSValue, index, number, glue.GetJSSessionValue());
 }
Пример #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;
 }
Пример #18
0
 public void Insert(IJSCSGlue iIJSCBridge, int Index)
 {
     MappedJSValue.InvokeAsync("silentsplice", _CefV8Context, CefV8Value.CreateInt(Index), CefV8Value.CreateInt(1), iIJSCBridge.GetJSSessionValue());
     Items[Index] = iIJSCBridge;
 }
Пример #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);
     }
 }
Пример #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());
                    });
            }
        }     
Пример #21
0
 public BridgeUpdater GetUpdater(string propertyName, IJSCSGlue glue)
 {
     UpdateGlueProperty(propertyName, glue);
     return(new BridgeUpdater(viewModelUpdater => viewModelUpdater?.UpdateProperty(CachableJSValue, propertyName, glue.GetJSSessionValue(), !glue.IsBasic())));
 }