internal JsUpdateHelper(IBindingLifeCycle bindingLifeCycle, HtmlViewContext context, Lazy <IJavascriptFrameworkMapper> frameworkMapper, ISessionCache sessionCache) { _Context = context; _JavascriptFrameworkMapper = frameworkMapper; _SessionCache = sessionCache; bindingLifeCycle.OnJavascriptSessionReady += BindingLifeCycleOnJavascriptSessionReady; }
internal JavascriptFrameworkRealMapper(HtmlViewContext context, IJavascriptSessionInjector sessionInjector, IInternalSessionCache sessionCache, IJavascriptObjectBuilderStrategy builderStrategy) { _SessionInjector = sessionInjector; _SessionCache = sessionCache; _BuilderStrategy = builderStrategy; _Context = context; }
internal JsUpdateHelper(ISessionMapper sessionMapper, HtmlViewContext context, Func <IJavascriptObjectBuilderStrategy> strategy, SessionCacher sessionCache) { _SessionMapper = sessionMapper; _Context = context; _BuilderStrategy = new Lazy <IJavascriptObjectBuilderStrategy>(strategy); _SessionCache = sessionCache; _SessionMapper.OnJavascriptSessionReady += _SessionMapper_OnJavascriptSessionReady; }
internal HtmlBinding(BidirectionalMapper convertToJso, IWebSessionLogger logger) { _Context = convertToJso.Context; _BidirectionalMapper = convertToJso; _Logger = logger; _Bindings.Add(this); _Logger.Debug(() => $"HTML_Binding {_Current} created"); }
internal HtmlBinding(BidirectionalMapper bidirectionalMapper) { _Context = bidirectionalMapper.Context; _BidirectionalMapper = bidirectionalMapper; _Logger = _Context.Logger; _Bindings.Add(this); _Logger.Debug(() => $"HTML_Binding {_Current} created"); }
internal static IJavascriptFrameworkMapper GetMapper(this HtmlViewContext context, IInternalSessionCache sessionCache, IJavascriptObjectBuilderStrategy builderStrategy) { var mapping = context.JavascriptFrameworkIsMappingObject; return(mapping ? (IJavascriptFrameworkMapper) new JavascriptFrameworkRealMapper(context, context.JavascriptSessionInjector, sessionCache, builderStrategy) : new JavascriptFrameworkNoMapper(context, sessionCache, builderStrategy)); }
public JsCommand(HtmlViewContext context, IJavascriptToCSharpConverter converter, ICommand command) : base(context, converter) { _Command = command; try { _CanExecute = _Command.CanExecute(null); } catch { } }
internal JsCommand(HtmlViewContext context, IJavascriptToGlueMapper converter, ICommand command) : base(context, converter) { _Command = command; try { _CanExecute = _Command.CanExecute(null); } catch { } }
public JsCommand(HtmlViewContext context, IJavascriptToCSharpConverter converter, ICommand command) { _JavascriptToCSharpConverter = converter; _HtmlViewContext = context; _Command = command; try { _InitialCanExecute = _Command.CanExecute(null); } catch { } }
public override void Install(IServiceProvider serviceProvider, IViewManager viewManager) { base.Install(serviceProvider, viewManager); HtmlViewContext dbContext = serviceProvider.GetService <HtmlViewContext>(); if (dbContext == null) { throw new Exception("Unable to install HtmlView tables"); } dbContext.Database.Migrate(); }
protected override void Init() { _CSharpMapper = Substitute.For <ISessionCache>(); _ObjectChangesListener = new ObjectChangesListener(_ => { }, _ => { }, _ => { }, _ => { }); _GlueFactory = new GlueFactory(null, _CSharpMapper, null, _ObjectChangesListener); _CSharpMapper.GetCached(Arg.Any <object>()).Returns((IJsCsGlue)null); _JavascriptFrameworkManager = Substitute.For <IJavascriptFrameworkManager>(); _HtmlViewContext = new HtmlViewContext(WebBrowserWindow, GetTestUIDispacther(), _JavascriptFrameworkManager, _Logger); _ConverTOJSO = new CSharpToGlueMapper(_CSharpMapper, _GlueFactory, _Logger); _Test = new TestClass { S1 = "string", I1 = 25 }; _Tests = new List <TestClass> { new TestClass() { S1 = "string1", I1 = 1 }, new TestClass() { S1 = "string2", I1 = 2 } }; _Test2 = new Test2() { T1 = _Test, T2 = _Test }; _TestsNg = new ArrayList { _Tests[0], _Tests[0] }; _CircularSimple = new Circular1(); _CircularSimple.Reference = _CircularSimple; _CircularComplex = new Circular2(); var circularChild = new Circular2 { Reference = _CircularComplex }; _CircularComplex.List.Add(circularChild); }
public JsMappedCommand(HtmlViewContext context, IJavascriptToCSharpConverter converter, ICommand <T> resultCommand) : base(context, converter, resultCommand) { }
internal StringBinding(HtmlViewContext context, IJavascriptObject root) { _Context = context; _Root = root; }
public JsMappedCommandWithoutParameter(HtmlViewContext context, IJavascriptToGlueMapper converter, ICommandWithoutParameter command) : base(context, converter, command) { }
public JsMappableSimpleCommand(HtmlViewContext context, IJavascriptToGlueMapper converter, ISimpleCommand resultCommand) : base(context, converter, resultCommand) { }
public JsSimpleCommand(HtmlViewContext context, IJavascriptToGlueMapper converter, ISimpleCommand <T> simpleCommand) : base(context, converter) { _JsSimpleCommand = simpleCommand; }
public GlueFactory(HtmlViewContext context, ICSharpToJsCache cacher, IJavascriptToCSharpConverter converter, ObjectChangesListener onListener) : base(cacher, onListener) { _HtmlViewContext = context; _JavascriptToCSharpConverter = converter; }
protected JsResultCommandBase(HtmlViewContext context, ICSharpUnrootedObjectManager manager, IJavascriptToGlueMapper converter) { _HtmlViewContext = context; JavascriptToGlueMapper = converter; _CSharpUnrootedObjectManager = manager; }
public JsMappableResultCommand(HtmlViewContext context, ICSharpUnrootedObjectManager manager, IJavascriptToGlueMapper converter, IResultCommand <TArg, TResult> resultCommand) : base(context, manager, converter, resultCommand) { }
public JsResultCommand(HtmlViewContext context, ICSharpUnrootedObjectManager manager, IJavascriptToGlueMapper converter, IResultCommand <TResult> resultCommand) : base(context, manager, converter) { _JsResultCommand = resultCommand; }
public JsMappableCommand(HtmlViewContext context, IJavascriptToCSharpConverter converter, ICommand command) : base(context, converter, command) { }
public JsSimpleCommandBase(HtmlViewContext context, IJavascriptToGlueMapper converter) { _HtmlViewContext = context; JavascriptToGlueMapper = converter; }
public JsResultCommand(HtmlViewContext context, IJavascriptToCSharpConverter converter, IResultCommand <TArg, TResult> resultCommand) : base(context, converter) { _JsResultCommand = resultCommand; }
public JsCommand(HtmlViewContext context, IJavascriptToCSharpConverter converter, ICommand <T> command) : base(context, converter) { _Command = command; _CanExecute = true; }
internal JsCommandWithoutParameter(HtmlViewContext context, IJavascriptToGlueMapper converter, ICommandWithoutParameter command) : base(context, converter) { _Command = command; _CanExecute = _Command.CanExecute; }
public JsSimpleCommandBase(HtmlViewContext context, IJavascriptToCSharpConverter converter) { _HtmlViewContext = context; _JavascriptToCSharpConverter = converter; }
public JsSimpleCommand(HtmlViewContext context, IJavascriptToCSharpConverter converter, ISimpleCommand simpleCommand) : base(context, converter) { _JsSimpleCommand = simpleCommand; }
public JsResultCommand(HtmlViewContext context, IJavascriptToCSharpConverter converter, IResultCommand resultCommand) { _HtmlViewContext = context; _JavascriptToCSharpConverter = converter; _JsResultCommand = resultCommand; }
protected JsCommandBase(HtmlViewContext context, IJavascriptToCSharpConverter converter) { _JavascriptToCSharpConverter = converter; _HtmlViewContext = context; }
internal JavascriptFrameworkNoMapper(HtmlViewContext context, ISessionCache sessionCache, IJavascriptObjectBuilderStrategy builderStrategy) { _Context = context; _SessionCache = sessionCache; _BuilderStrategy = builderStrategy; }