public void Execute(List <string>?args = null) { string version = VersionService.GetVersion(); string build = BuildService.GetBuild(); Console.Write($"Lexica {version} (CLI)"); if (build.Length > 0) { Console.Write($" (build: {build})"); } Console.WriteLine(); Console.WriteLine("Copyright (c) Łukasz Rydzkowski"); }
public void SetVersionInWindowTitle() { string appName = "Lexica"; string version = VersionService.GetVersion(); string build = BuildService.GetBuild(); string title = $"{appName} {version}"; if (build.Length > 0) { title += $" ({build})"; } Console.Title = title; }
public IActionResult OnGetAsync(int?id) { if (id == null) { return(NotFound()); } Build = _context.GetBuild(id.Value); if (Build == null) { return(NotFound()); } return(Page()); }
public async Task <ActionResult <DsBuildResponse> > GetBuild(DsBuildRequest request) { Stopwatch sw = new Stopwatch(); sw.Start(); DsBuildResponse response; if (!memoryCache.TryGetValue(request.CacheKey, out response)) { response = await BuildService.GetBuild(context, request); memoryCache.Set(request.CacheKey, response, CacheService.BuildCacheOptions); sw.Stop(); logger.LogInformation($"Get Build in {sw.ElapsedMilliseconds} ms"); } else { sw.Stop(); logger.LogInformation($"Get Build from Cache in {sw.ElapsedMilliseconds} ms"); } return(response); }
public async Task <DsBuildResponse> GetBuild(DsBuildRequest request) { return(await BuildService.GetBuild(context, request)); }
public async Task <Build> Get(string id) { return(await _buildService.GetBuild(id)); }