public async Task <AverageSizes> getAverages(int seconds, IJSRuntime jSRuntime) { string serverUrl = Configuration["ServerUrl"]; controllerUrl = $"{serverUrl}api/BookColumns/"; await Task.Yield(); AverageSizes values = new AverageSizes(); #if tracing JSRuntimeExtensions.GroupTable(jSRuntime, values, "new AverageSizes"); #endif var url = $"{controllerUrl}getLtAverages/{seconds}"; try { values = await Http.GetFromJsonAsync <AverageSizes>(url); } //catch { } catch (System.Exception ex) { throw new System.Exception($"Check that tapeStream Server {controllerUrl} is running.", ex); } #if tracing JSRuntimeExtensions.GroupTable(jSRuntime, values, "AverageSizes values"); #endif return(values); }
public async Task <RatioFrame> getIncrementalRatioFrames(int seconds, int last, IJSRuntime jSRuntime) { string serverUrl = Configuration["ServerUrl"]; controllerUrl = $"{serverUrl}api/BookColumns/"; await Task.Yield(); var route = $"getIncrementalRatioFrames/{seconds}/{last}"; RatioFrame values = new RatioFrame(); #if tracing JSRuntimeExtensions.GroupTable(jSRuntime, values, "new AverageSizes"); #endif try { values = await Http.GetFromJsonAsync <RatioFrame>($"{controllerUrl}{route}"); } catch { } #if tracing JSRuntimeExtensions.GroupTable(jSRuntime, values, "AverageSizes Ratios values"); #endif return(values); }
public async Task <List <RatioFrame[]> > getAllRatioFrames(string symbol, double OADate, IJSRuntime jSRuntime) { //string serverUrl = Configuration["ServerUrl"]; string serverUrl = "http://localhost:55540/"; controllerUrl = $"{serverUrl}api/BookColumns/"; await Task.Yield(); var route = $"getAllRatioFrames/{symbol}/{OADate}"; List <RatioFrame[]> values = new List <RatioFrame[]>(); #if tracing JSRuntimeExtensions.GroupTable(jSRuntime, values, "new AverageSizes"); #endif try { var json = await Http.GetFromJsonAsync <string>($"{controllerUrl}{route}"); values = JsonSerializer.Deserialize <List <RatioFrame[]> >(json); } catch (System.Exception ex) { } #if tracing JSRuntimeExtensions.GroupTable(jSRuntime, values, "AverageSizes Ratios values"); #endif return(values); }
public async Task <AverageSizes> getLtRatios(int seconds, IJSRuntime jSRuntime) { string serverUrl = Configuration["ServerUrl"]; controllerUrl = $"{serverUrl}api/BookColumns/"; await Task.Yield(); AverageSizes values = new AverageSizes(); #if tracing JSRuntimeExtensions.GroupTable(jSRuntime, values, "new AverageSizes"); #endif try { values = await Http.GetFromJsonAsync <AverageSizes>($"{controllerUrl}getLtRatios/{seconds}"); } catch { } #if tracing JSRuntimeExtensions.GroupTable(jSRuntime, values, "AverageSizes Ratios values"); #endif return(values); }