using BPASmartClient.Message;
using HBLConsole.Communication;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPASmartClient.Business
{
    /// <summary>
    /// 主控入口
    /// </summary>
    public class MainConsole
    {
        /// <summary>
        /// 主业务线开始
        /// </summary>
        public void Start()
        {
            //网络相关
            InternetInfo.InitConfig();
            //业务插件初始化
            Plugin.GetInstance().Init();

            //设备开启
            Plugin.GetInstance().GetPlugin<DeviceMgr>().StartService();

            //MessageLog.GetInstance.InfoNotify = new Action<string>((msg =>
            //{
            //    Console.WriteLine(msg);
            //}));
        }

        /// <summary>
        /// 主业务线停止
        /// </summary>
        public void Stop()
        {
            Plugin.GetInstance().Dispose();
        }
    }
}
