Ejemplo n.º 1
0
        // [Inject] IndexedDBManager indexedDbManager { get; set; }

        protected override void OnInitialized()
        {
            if (!LocalData.ProductionOrDevelopmentMode)
            {
                if (!BlazorWindowHelper.BWHJsInterop.IsReady)
                {
                    BlazorWindowHelper.BWHJsInterop.jsRuntime = jsRuntime;
                    BlazorWindowHelper.BWHJsInterop.IsReady   = true;
                }
            }


            if (WebApiFunctions.httpClient is null)
            {
                WebApiFunctions.httpClient = httpClient;
            }

            if (LocalFunctions.navigationManager is null)
            {
                LocalFunctions.navigationManager = navigationManager;
            }

            if (BTodosJsInterop.jsRuntime is null)
            {
                BTodosJsInterop.jsRuntime = jsRuntime;
            }

            if (LocalData.UsingIndexedDb)
            {
                if (LocalData.indexedDbManager is null)
                {
                    //LocalData.indexedDbManager = indexedDbManager;
                }
            }


            if (!navigationManager.BaseUri.Equals(navigationManager.Uri))
            {
                navigationManager.NavigateTo("/");
            }


            LocalData.mainLayout = this;



            LocalFunctions.CmdPrepare();



            base.OnInitialized();
        }