public static async Task Main(string[] args) { try { if (TryGetRunInfo(args, out RunInfoBase runInfo)) { string configFilePath = GetConfigFilePath(runInfo); FfdbConfig config = FileConfigResolver.FromFile(configFilePath); DataRepoState dataRepoState = await GetDataRepoStateAsync(); FfdbEngine engine = EngineResolver.Resolve(config, runInfo, dataRepoState); OutputCommandInfo(runInfo); await new EngineRunner(engine).RunAsync(runInfo); } } catch (Exception ex) { CM.WriteError(ex.Message); } finally { WriteLine(Environment.NewLine + "Completed running command. Press any key to exit.."); ReadKey(); } }
public static IEngine Engine(this HttpRequest request) { var service = new UserAgentService(request.HttpContext); var resolver = new EngineResolver(service); return(resolver.Engine); }
public bool CheckDependencies(ProjectItem projectItem) { var filename = projectItem.FileName(); var engine = EngineResolver.GetEngineByFilename(filename); if (engine == null) { return(false); } var contents = FileHandler.GetContents(filename); SaveDependencies(projectItem, filename, contents, engine); return(true); }
public IEnumerable <FileAssociation> Run(ProjectItem projectItem) { var filename = projectItem.FileName(); var engine = EngineResolver.GetEngineByFilename(filename); var result = new List <FileAssociation>(); TaskList.Remove(filename); if (engine != null) { result.AddRange(ProcessEngine(projectItem, filename, engine)); } var associations = RunDependencies(filename); if (associations != null) { result.AddRange(associations); } return(result); }