Ejemplo n.º 1
0
 /// <summary>
 ///     初始化一个DumbQQClient。
 /// </summary>
 public DumbQQClient()
 {
     BasicConfigurator.Configure(Repository);
     Handler.UseCookies        = true;
     Handler.CookieContainer   = Cookies;
     Handler.AllowAutoRedirect = true;
     Client.DefaultRequestHeaders.Add("User-Agent", ApiUrl.UserAgent);
     Client.DefaultRequestHeaders.Add("KeepAlive", "true");
     _cache         = new CacheDepot(CacheTimeout);
     _myInfoCache   = new Cache <FriendInfo>(CacheTimeout);
     _qqNumberCache = new CacheDictionary <long, long>(CacheTimeout);
 }
Ejemplo n.º 2
0
 /// <summary>
 ///     初始化一个DumbQQClient。
 /// </summary>
 public DumbQQClient()
 {
     XmlConfigurator.Configure();
     Client.Request.UserAgent         = ApiUrl.UserAgent;
     Client.Request.PersistCookies    = true;
     Client.Request.KeepAlive         = true;
     Client.Request.Accept            = null;
     Client.ThrowExceptionOnHttpError = false;
     _cache         = new CacheDepot(CacheTimeout);
     _myInfoCache   = new Cache <FriendInfo>(CacheTimeout);
     _qqNumberCache = new CacheDictionary <long, long>(CacheTimeout);
 }