protected override async Task OnInitializedAsync() { JsFastDataExchanger.jsRuntime = jsRuntime; BWHWindowHelper.jsRuntime = jsRuntime; CounterHelper.Initialize(); await CounterHelper.CmdAddCounter(new TSCounter() { Source = navigationManager.Uri, Action = "visit" }); await base.OnInitializedAsync(); return; }
protected override async Task OnInitializedAsync() { LBDLocalData.mainLayout = this; LocalFunctions.navigationManager = navigationManager; CounterHelper.Initialize(); LocalFunctions.RedirectIfNeeded(navigationManager); LBDJsInterop.jsRuntime = jsRuntime; BWHJsInterop.jsRuntime = jsRuntime; await CheckCounterIsDisabled(); //if (WebApiFunctions.httpClient is null) //{ // WebApiFunctions.httpClient = httpClient; // WebApiFunctions.httpClient.BaseAddress = LocalData.WebApi_Uri; // WebApiFunctions.httpClient.Timeout = TimeSpan.FromMilliseconds(Timeout.Infinite); // WebApiFunctions.CmdGetVisitor(); //} //if (LocalData.IsDevelopmentMode) //{ // if (!BlazorWindowHelper.BWHJsInterop.IsReady) // { // BlazorWindowHelper.BWHJsInterop.jsRuntime = jsRuntime; // BlazorWindowHelper.BWHJsInterop.IsReady = true; // } //} if (LBDLocalData.TimezoneOffset == -99999) { LBDLocalData.TimezoneOffset = await BWHJsInterop.GetTimezoneOffset(); } await base.OnInitializedAsync(); return; }