internal BidirectionalMapper(object iRoot, IWebView iwebview, IDispatcher UIDispatcher, JavascriptBindingMode iMode, object iadd)
        {
            _IWebView = iwebview;
            _JSObjectBuilder = new CSharpToJavascriptMapper(iwebview,UIDispatcher, this);
            _Root = _JSObjectBuilder.Map(iRoot, iadd);
            _UnrootedEntities = new List<IJSCSGlue>();
            _BindingMode = iMode;

            IJavascriptListener JavascriptObjecChanges = null;
            if (iMode == JavascriptBindingMode.TwoWay)
                JavascriptObjecChanges = this;


            _SessionInjector = new JavascriptSessionInjector(iwebview, JavascriptObjecChanges);
        }
        protected override void Init()
        {
            _IJSOBuilder = new CefV8_Factory(_WebView);
            _ICSharpMapper = Substitute.For<IJSCBridgeCache>();
            _ICSharpMapper.GetCached(Arg.Any<object>()).Returns((IJSCSGlue)null);
            _ConverTOJSO = new CSharpToJavascriptMapper(_WebView, new TestIUIDispatcher(), _ICSharpMapper);
            _Test = new TestClass { S1 = "string", I1 = 25 };
            _Tests = new List<TestClass>();
            _Tests.Add(new TestClass() { S1 = "string1", I1 = 1 });
            _Tests.Add(new TestClass() { S1 = "string2", I1 = 2 });
            _Test2 = new Test2() { T1 = _Test, T2 = _Test };

            _Tests_NG = new ArrayList();
            _Tests_NG.Add(_Tests[0]);
            _Tests_NG.Add(_Tests[0]);
        }
        internal BidirectionalMapper(object iRoot, IWebView iwebview, IDispatcher UIDispatcher, JavascriptBindingMode iMode, object iadd)
        {
            _IWebView         = iwebview;
            _JSObjectBuilder  = new CSharpToJavascriptMapper(iwebview, UIDispatcher, this);
            _Root             = _JSObjectBuilder.Map(iRoot, iadd);
            _UnrootedEntities = new List <IJSCSGlue>();
            _BindingMode      = iMode;

            IJavascriptListener JavascriptObjecChanges = null;

            if (iMode == JavascriptBindingMode.TwoWay)
            {
                JavascriptObjecChanges = this;
            }


            _SessionInjector = new JavascriptSessionInjector(iwebview, JavascriptObjecChanges);
        }