コード例 #1
0
        /// <summary>
        /// 加载指定插件
        /// </summary>
        /// <param name="onloadCall">是否是飞鸽传书初始化时候的请求</param>
        internal bool LoadService(bool onloadCall)
        {
            if (PluginProvider == null || State == PluginState.Running || !PluginProvider.CheckCanLoad(onloadCall) || (!PluginProvider.SupportLoad && !onloadCall))
            {
                return(false);
            }
            else
            {
                PluginProvider.Startup();
                State = PluginState.Running;

                return(true);
            }
        }