コード例 #1
0
 public MqttThemeController(IMqttThemeBLL mqttThemeBLL, IMqttMsgBLL mqttMsgBLL,
                            MqttClientCenter mqttClientCenter)
 {
     _mqttThemeBLL     = mqttThemeBLL;
     _mqttMsgBLL       = mqttMsgBLL;
     _mqttClientCenter = mqttClientCenter;
 }
コード例 #2
0
ファイル: Startup.cs プロジェクト: zergmk2/YiShaAdminMk2
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env, MqttClientCenter mqttClient)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.UseSession();
            app.UseStaticFiles();

            app.UseRouting();
            app.UseEndpoints(endpoints =>
            {
                endpoints.MapControllerRoute("areas", "{area:exists}/{controller=Home}/{action=Index}/{id?}");
                endpoints.MapControllerRoute("default", "{controller=Home}/{action=Index}/{id?}");
                endpoints.MapDefaultControllerRoute();
            });

            GlobalContext.ServiceProvider = app.ApplicationServices;

            // mqttClient.ConnectMqttServerAsync().GetAwaiter().GetResult();
        }