Ejemplo n.º 1
0
        public static Action UpgradeVersionChangeEvent;//升级包版本改变触发事件

        /// <summary>
        /// 开始升级包程序
        /// </summary>
        public static void Start()
        {
            string publishServiceName = "UpgradeManage";
            //将升级包管理作为服务添加到发布订阅服务列表
            PublishServiceObject pso = new PublishServiceObject();

            pso.publishServiceName = publishServiceName;
            pso.explain            = "升级包程序";
            PublisherManage.AddPublishService(pso);
            //触发通知
            UpgradeManage.UpgradeVersionChangeEvent = (() =>
            {
                PublisherManage.SendNotify(publishServiceName);//订阅服务发送通知
            });
        }
Ejemplo n.º 2
0
        public static Action CacheChangeEvent;     //缓存改变触发事件

        /// <summary>
        /// 开始缓存
        /// </summary>
        public static void Start()
        {
            CacheNameList = new List <string>();//缓存列表

            string publishServiceName = "DistributedCache";
            //将分布式缓存作为服务添加到发布订阅服务列表
            PublishServiceObject pso = new PublishServiceObject();

            pso.publishServiceName = publishServiceName;
            pso.explain            = "分布式缓存";
            PublisherManage.AddPublishService(pso);
            //触发通知
            DistributedCacheManage.CacheChangeEvent = (() =>
            {
                PublisherManage.SendNotify(publishServiceName);//订阅服务发送通知
            });
        }