Пример #1
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);
        }
 public Test_JavascriptToCSharpMapper_Simple()
 {
     _JavascriptToCSharpMapper = new JavascriptToCSharpMapper();
 }