예제 #1
0
        /// <summary>
        /// 构造方法
        /// </summary>
        /// <param name="intervalMillseconds">间隔时间,单位:毫秒</param>
        /// <param name="state">状态</param>
        /// <param name="options">Consul基本选项</param>
        public ConsulServiceProviderTimerRefreshCache(int intervalMillseconds, object state = null, ConsulBasicOption options = null)
            : base(intervalMillseconds, state, false)
        {
            if (options == null)
            {
                defaultServicesProvider = new ConsulServicesProvider();
            }
            else
            {
                defaultServicesProvider = new ConsulServicesProvider(options);
            }

            InitTimer();
        }
 /// <summary>
 /// 构造方法
 /// </summary>
 /// <param name="intervalMillseconds">间隔时间,单位:毫秒</param>
 /// <param name="options">Consul基本选项</param>
 public ConsulServiceProviderAgg(int intervalMillseconds, ConsulBasicOption options = null)
 {
     this.intervalMillseconds = intervalMillseconds;
     this.options             = options;
 }