public Settings() { Root = Environment.CurrentDirectory; Identifier = "require"; Compilers = new ICompile[] {new CoffeeScriptCompiler(), new JavaScriptCompiler()}; Dependencies = new string[0]; }
/// <summary> /// Конструктор /// </summary> public Criterion(ICompile criteria, string propertyName, string alias = "") { expressions = new List <IExpression>(); this.propertyName = propertyName; baseCriteria = criteria; this.alias = alias; }
internal override Expression CreateExpression(ParameterExpression sourceData, ParameterExpression param) { SelectNode select = FindChild <SelectNode>(1); Debug.Assert(select != null); Debug.Assert(select.IsScalarHint, "record set sub queries don't work yet"); Type queryType = typeof(ScalarQuery <,>).MakeGenericType(param.Type, typeof(object)); ICompile query = (ICompile)Activator.CreateInstance(queryType, "subquery"); query.Compile(select); return(Expression.Call(Expression.Constant(query), query.GetType().GetMethod("Evaluate"), sourceData)); }
private void autoCompile(string file = "") { if (file != String.Empty) { if (readFile(file)) { return; } } if (!m_bFileLoaded) { Console.Clear(); Console.WriteLine("-> CKT-PLC-Compile <-"); Console.WriteLine("-- ERROR ------------"); Console.WriteLine("No file loaded! Press any key!"); Console.ReadKey(); } bool result = false; int errLine = -1; string msg = ""; ICompile Compiler = null; switch (m_iExtensionIndex) { case eValidExtensions.ED: Compiler = new CompilerCED(); result = Compiler.loadData(@"..\..\..\RES\COMPILER\CMD_VERSIONS.CRD", out msg); break; case eValidExtensions.DB: Compiler = new CompilerCDB(); break; case eValidExtensions.FB: Compiler = new CompilerCFB(); break; case eValidExtensions.PR: Compiler = new CompilerCPR(); break; case eValidExtensions.PV: Compiler = new CompilerCPV(); break; case eValidExtensions.EV: Compiler = new CompilerCEV(); break; } result = Compiler.compile(m_FileData, out errLine, out msg); if (result) { Console.Clear(); Console.WriteLine("-> CKT-PLC-Compile <-"); Console.WriteLine("-- ERROR ------------"); Console.WriteLine(msg); Console.WriteLine("LINE: " + errLine); Console.WriteLine("Press any key!"); Console.ReadKey(); return; } result = Compiler.write(out msg); Console.Clear(); Console.WriteLine("-> CKT-PLC-Compile <-"); Console.WriteLine("-- COMPLETE----------"); Console.WriteLine(msg); Console.WriteLine("Press any key!"); Console.ReadKey(); }
public void Setup() { RouteCollection routeTable = new RouteCollection(); RouteConfig.RegisterRoutes(routeTable); MVCRouteConfiguration.Initialize(routeTable, typeof(HomeController).Assembly); routeGeneration = new MVCRouteGenerator(); // Generate all routes var allReference = new RelativeReference("all.routes", 0) { Type = Reference.TypeEnum.Generated }; routeGeneration.Compile(ref allReference); allControllers = allReference.Content; allControllers.ShouldNotBeEmpty(); // Generate home routes var homeReference = new RelativeReference("home.routes", 0) { Type = Reference.TypeEnum.Generated }; routeGeneration.Compile(ref homeReference); homeController = homeReference.Content; homeController.ShouldNotBeEmpty(); // Generate auth routes var authReference = new RelativeReference("auth.routes", 0) { Type = Reference.TypeEnum.Generated }; routeGeneration.Compile(ref authReference); authController = authReference.Content; authController.ShouldNotBeEmpty(); Url = RouteHelper.GetUrlHelper(routeTable); }
public TwitterControllerSpecification() { target = new TwitterController(); }
public MetacriticControllerSpecification() { target = new MetacriticController(); }
/// <summary> /// Конструктор /// </summary> public Criterion(ICompile criteria, Expression <Func <TParent, object> > expr) { expressions = new List <IExpression>(); createExpression = expr; baseCriteria = criteria; }