Specifying dynamic date ranges

A few years ago I wrote a small simple FSM to parse date ranges in our applications and created a fancy widget to manipulate them in the UI. These initially took forms like “-30day”but quickly grew to a more complex form “(?<anchor>…)?(?<continuation>…)*(?::(?<anchor>…)?(?<continuation>…)*)?” where anchor was either implied to be today’s date or one of a […]

Hard question for dotnet core friends.

DotnetCore 2.2 REST Api Startup.cs services.AddHttpClient(); public class Provider : IProvider { private readonly IHttpClientFactory _clientFactory; public Provider(IHttpClientFactory clientFactory) { this._clientFactory = clientFactory; } public async Task<HttpResponseMessage> SubmitRequest(string parm) { var client = _clientFactory.CreateClient(); client.Timeout = TimeSpan.FromSeconds(30); var start = DateTime.Now; var response = await client.GetAsync(“http://localhost:53702/system”); var span = start – DateTime.Now; return response; } […]