CacheAutorize.cs
1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Quiz.Utility.Cache;
using WeixinApi;
namespace WeiXinCenter.Cache
{
public class CacheAutorize
{
CacheItem<Dictionary<string, WeixinAccount>> _cacheitem;
public Dictionary<string, WeixinAccount> CacheData { get { return _cacheitem.CacheData; } }
public CacheAutorize()
{
_cacheitem = new CacheItem<Dictionary<string, WeixinAccount>>(Init);
_cacheitem.InitCache();
}
public void Refresh()
{
_cacheitem.InitCache();
}
~CacheAutorize()
{
_cacheitem.Dispose();
}
Dictionary<string, WeixinAccount> Init()
{
Dictionary<string, WeixinAccount> wxdic = new Dictionary<string, WeixinAccount>();
//wxdic.Add("zjjd", new WeixinAccount("gh_a18fefb4fe8c", "wx04cedebd071a3f27", "74972a74784bcd6d430f72fce0d40f33"));
//wxdic.Add("zkydt", new WeixinAccount("gh_9f52bf7b7128", "wx2b97f56897756cbb", "de630194fb3c3f54720b4f70b2aa7920"));
wxdic.Add("kqjt", new WeixinAccount("gh_307f246840ea", "wxb85b19202efd15f9", "583fbd26bea7de6e4f2925db98ee9dab"));
return wxdic;
}
}
}