Exemple #1
0
 public static ValueBindingExpression CreateThisBinding <T>(BindingCompilationService service, DataContextStack dataContext) =>
 CreateBinding <T>(service, o => (T)o[0], dataContext);
Exemple #2
0
 public DataPager(CommonBindings commonBindings, BindingCompilationService bindingService)
     : base("div")
 {
     this.commonBindings = commonBindings;
     this.bindingService = bindingService;
 }
Exemple #3
0
 public void INIT()
 {
     this.configuration  = DotvvmConfiguration.CreateDefault();
     this.bindingService = configuration.ServiceLocator.GetService <BindingCompilationService>();
 }
 public static ValueBindingExpression CreateBinding <T>(BindingCompilationService service, Func <object[], T> func, ParametrizedCode expression) =>
 new ValueBindingExpression(service, new object[] {
     new CompiledBindingExpression.BindingDelegate((o, c) => func(o)),
     new ResultTypeBindingProperty(typeof(T)),
     new KnockoutExpressionBindingProperty(expression, expression)
 });
Exemple #5
0
 public DefaultViewModel(BindingCompilationService bindingCompilationService)
 {
     this.bindingCompilationService = bindingCompilationService;
 }
 public ValueBindingExpression(BindingCompilationService service, IEnumerable <object> properties)
     : base(service, properties)
 {
     AddNullResolvers();
 }
 public void INIT()
 {
     this.configuration = DotvvmTestHelper.CreateConfiguration();
     configuration.RegisterApiClient(typeof(TestApiClient), "http://server/api", "./apiscript.js", "_api");
     this.bindingService = configuration.ServiceProvider.GetRequiredService <BindingCompilationService>();
 }
 public void INIT()
 {
     this.configuration  = DotvvmTestHelper.CreateConfiguration();
     this.bindingService = configuration.ServiceLocator.GetService <BindingCompilationService>();
 }
Exemple #9
0
 public ResolvedTreeBuilder(BindingCompilationService bindingService)
 {
     this.bindingService = bindingService;
 }
Exemple #10
0
 public CommandBindingExpression(BindingCompilationService service, CompiledBindingExpression.BindingDelegate command, string id)
     : base(service, new object[] { command, new IdBindingProperty(id), new CommandJavascriptBindingProperty(CreateJsPostbackInvocation(id)) })
 {
 }
 public ResourceBindingExpression(BindingCompilationService service, IEnumerable <object> properties) : base(service, properties)
 {
 }
Exemple #12
0
 public CommandBindingExpression(BindingCompilationService service, Delegate command, string id)
     : this(service, (h, o) => command, id)
 {
 }
Exemple #13
0
 public CommandBindingExpression(BindingCompilationService service, Action <object[]> command, string id)
     : this(service, (h, o) => (Action)(() => command(h)), id)
 {
 }
Exemple #14
0
 public CommandBindingExpression(BindingCompilationService service, Func <object[], Task> command, string id)
     : this(service, (h, o) => (Command)(() => command(h)), id)
 {
 }
Exemple #15
0
 public override IEnumerable <Delegate> GetResolvers() => BindingCompilationService.GetDelegates(new[] { new Methods() });
Exemple #16
0
 public ResolvedTreeBuilder(BindingCompilationService bindingService, CompiledAssemblyCache compiledAssemblyCache)
 {
     this.bindingService        = bindingService;
     this.compiledAssemblyCache = compiledAssemblyCache;
 }
 public ControlPropertyBindingExpression(BindingCompilationService service, IEnumerable <object> properties) : base(service, properties)
 {
 }
Exemple #18
0
 public virtual void Initialize()
 {
     Configuration  = DotvvmTestHelper.DefaultConfig;
     BindingService = Configuration.ServiceProvider.GetRequiredService <BindingCompilationService>();
 }
 /// Creates binding {value: _this} for a specific data context. Note that the result is cached (non-deterministically, using the <see cref="DotVVM.Framework.Runtime.Caching.IDotvvmCacheAdapter" />)
 public static ValueBindingExpression <T> CreateThisBinding <T>(BindingCompilationService service, DataContextStack dataContext) =>
 service.Cache.CreateCachedBinding("ValueBindingExpression.ThisBinding", new [] { dataContext }, () => CreateBinding <T>(service, o => (T)o[0], dataContext));
Exemple #20
0
 public StaticCommandBindingExpression(BindingCompilationService service, IEnumerable <object> properties) : base(service, properties)
 {
 }
 public void INIT()
 {
     this.configuration  = DotvvmTestHelper.DefaultConfig;
     this.bindingService = configuration.ServiceProvider.GetRequiredService <BindingCompilationService>();
 }
Exemple #22
0
 public TextRepeater(BindingCompilationService bindingService)
 {
     this.bindingService = bindingService;
 }