Exemplo n.º 1
0
        protected async Task <BindingInContext> BindInContext(HtmlViewEngine engine, object dataContext, JavascriptBindingMode mode = JavascriptBindingMode.TwoWay)
        {
            var cacher  = new SessionCacher();
            var mapper  = new BidirectionalMapper(dataContext, engine, null, null, mode, engine.Logger, cacher);
            var builder = new BindingBuilder(mapper, engine.Logger) as IBindingBuilder;
            var binding = await builder.CreateBinding(false);

            return(new BindingInContext(binding, cacher));
        }