示例#1
0
        public T GetJsBridge <T>(Func <T> factory) where T : JsBridgeBase
        {
            if (_jsBridgeSet)
            {
                return((T)_jsBridge);
            }

            _jsBridge    = factory();
            _jsBridgeSet = true;

            try {
                if (_inner != null)
                {
                    _inner.ObjectForScripting = _jsBridge;
                }
            } catch (ArgumentException) {
                Logging.Warning("Failed to set: " + (_jsBridge?.GetType().FullName ?? @"NULL"));
                throw;
            }

            return((T)_jsBridge);
        }
示例#2
0
 public JsProxyBase(JsBridgeBase bridge)
 {
     _bridge = bridge;
 }
示例#3
0
 protected JsProxyCSharp(JsBridgeBase bridge) : base(bridge)
 {
 }