public RuleEngine(DataContext context) { this.context = context; proxyProvider = new ProxyProvider(this); tagManager = new TagManager(this); helperProvider = new HelperProvider(this); ExtractCompiledAssemblyFile(); }
public HelperInfo(HelperProvider provider, Type type) { this.provider = provider; var attribute = type.GetCustomAttributes(typeof(HelperAttribute), false).Cast<HelperAttribute>().Single(); Name = attribute.Name; InterfaceType = attribute.InterfaceType; DebugModeOnly = attribute.DebugModeOnly; var newExpr = Expression.New(type.GetConstructor(ctorParameters), ruleContextParameterExpr); creator = Expression.Lambda<Func<CompiledRuleContext, object>>(newExpr, ruleContextParameterExpr).Compile(); }
public HelperInfo(HelperProvider provider, Type type) { this.provider = provider; var attribute = type.GetCustomAttributes(typeof(HelperAttribute), false).Cast <HelperAttribute>().Single(); Name = attribute.Name; InterfaceType = attribute.InterfaceType; DebugModeOnly = attribute.DebugModeOnly; var newExpr = Expression.New(type.GetConstructor(ctorParameters), ruleContextParameterExpr); creator = Expression.Lambda <Func <CompiledRuleContext, object> >(newExpr, ruleContextParameterExpr).Compile(); }