Пример #1
0
        /// <summary>
        /// 以配置的方式初始化Gatherer的上下文
        /// </summary>
        public static void Setup()
        {
            if (hasInited)
            {
                return;
            }

            context   = new GathererContext();
            hasInited = true;
        }
Пример #2
0
        /// <summary>
        /// 初始化Gatherer的上下文
        /// </summary>
        /// <param name="appAccesstoken">应用的AccessToken</param>
        /// <param name="terminalId">默认使用终端的ID</param>
        public static void Setup(string appAccesstoken, int tId)
        {
            if (hasInited)
            {
                return;
            }

            if (String.IsNullOrWhiteSpace(appAccesstoken))
            {
                throw new ArgumentException("应用的AccessToken不能为空");
            }

            terminalId = tId;

            context   = new GathererContext();
            hasInited = true;
        }
Пример #3
0
        /// <summary>
        /// 初始化Gatherer的上下文
        /// </summary>
        /// <param name="appAccesstoken">应用的AccessToken</param>
        /// <param name="terminalId">默认使用终端的ID</param>
        public static void Setup(string appAccesstoken, int tId)
        {
            if (hasInited)
                return;

            if (String.IsNullOrWhiteSpace(appAccesstoken))
                throw new ArgumentException("应用的AccessToken不能为空");

            terminalId = tId;

            context = new GathererContext();
            hasInited = true;
        }
Пример #4
0
        /// <summary>
        /// 以配置的方式初始化Gatherer的上下文
        /// </summary>
        public static void Setup()
        {
            if (hasInited)
                return;

            context = new GathererContext();
            hasInited = true;
        }