protected override void Init() { _IJSOBuilder = new LocalBuilder(_WebView); _ICSharpMapper = Substitute.For<IJSCBridgeCache>(); _ICSharpMapper.GetCached(Arg.Any<object>()).Returns((IJSCSGlue)null); _ConverTOJSO = new CSharpToJavascriptMapper(_WebView, _IJSOBuilder, _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, CefV8CompleteContext iwebview, JavascriptBindingMode iMode, object iadd) { _V8Context = iwebview; _LocalBuilder = new LocalBuilder(iwebview); _JSObjectBuilder = new CSharpToJavascriptMapper(iwebview, _LocalBuilder, this); _JavascriptToCSharpMapper = new JavascriptToCSharpMapper(); _Root = _JSObjectBuilder.Map(iRoot, iadd); _UnrootedEntities = new List<IJSCSGlue>(); _BindingMode = iMode; IJavascriptListener JavascriptObjecChanges = null; if (iMode == JavascriptBindingMode.TwoWay) JavascriptObjecChanges = this; _GlobalBuilder = new GlobalBuilder(_V8Context, "MVVMGlue"); _SessionInjector = new JavascriptSessionInjector(iwebview, _GlobalBuilder, JavascriptObjecChanges); }