Esempio n. 1
0
        public void Configure(IComponentsApplicationBuilder app)
        {
            app.UseDCLocalisationExtension();  // Æô¶¯±¾µØ»¯²Ù×÷

            app.UseDCHttpClientInterceptor();  // ÆôÓÃHttpÇëÇóÀ¹½ØÆ÷
            //var httpInterceptor = app.Services.GetService<HttpClientInterceptorService>();
            //httpInterceptor.BeforeSend += HttpInterceptor_BeforeSend;
            //httpInterceptor.AfterSend += HttpInterceptor_AfterSend;

            app.UseDCLoadingBar();

            app.AddComponent <App>("app");
        }
Esempio n. 2
0
        public void Configure(IComponentsApplicationBuilder app)
        {
            app.UseDCLocalisationExtension();  // 启动本地化操作

            app.UseDCHttpClientInterceptor();  // 启用Http请求拦截器
            //var httpInterceptor = app.Services.GetService<HttpClientInterceptorService>();
            //httpInterceptor.BeforeSend += HttpInterceptor_BeforeSend;
            //httpInterceptor.AfterSend += HttpInterceptor_AfterSend;

            app.UseDCLoadingBar();       // 使用网页加载顶部导航组件

            app.UseDCFontAwesomeIcons(); //使用AwesomeIcons组件

            app.AddComponent <App>("app");
        }
Esempio n. 3
0
        /// <summary>
        /// 将网页加载顶部进度条服务安装到运行时宿主环境。
        /// </summary>
        /// <param name="app">运行时宿主环境</param>
        /// <returns></returns>
        public static IComponentsApplicationBuilder UseDCLoadingBar(this IComponentsApplicationBuilder app)
        {
            if (Installed)
            {
                return(app);
            }

            app.UseDCHttpClientInterceptor();

            var loadingBar = app.Services.GetService <LoadingBarService>();

            loadingBar.ConstructDOM();

            Installed = true;
            return(app);
        }