Пример #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="manager"></param>
        /// <returns></returns>
        public static IQyTokenManager Qy(this TokenManager manager, APIType type = APIType.Weixin)
        {
            switch (type)
            {
            default:
            case APIType.Weixin:
                return(WeixinQyTokenManager.Instance());

            case APIType.Dingtalk:
                return(DingtalkQyTokenManager.Instance());
            }
        }
 /// <summary>
 /// 获取单例对象
 /// </summary>
 /// <returns></returns>
 internal static WeixinQyTokenManager Instance()
 {
     if (_instance == null)
     {
         lock (lockObject)
         {
             if (_instance == null)
             {
                 _instance = new WeixinQyTokenManager();
             }
         }
     }
     return(_instance);
 }