コード例 #1
0
 /// <summary>
 ///     Creates a new CachedCrestRequestHandler
 /// </summary>
 /// <param name="serializer"></param>
 public CachedCrestRequestHandler(ISerializer serializer)
 {
     Serializer = serializer;
     PublicMaxConcurrentRequests = DefaultPublicMaxConcurrentRequests;
     AuthedMaxConcurrentRequests = DefaultAuthedMaxConcurrentRequests;
     _publicPool = new Semaphore(PublicMaxConcurrentRequests, PublicMaxConcurrentRequests);
     _authedPool = new Semaphore(AuthedMaxConcurrentRequests, AuthedMaxConcurrentRequests);
     UserAgent   = Config.UserAgent;
     Charset     = DefaultCharset;
     Cache       = new EveLibFileCache(Config.AppData + Config.Separator + "EveCrestCache", "register");
     CacheLevel  = CacheLevel.Default;
 }
コード例 #2
0
        public EveApi(ILogger logger, IEveLibCache eveCache)
        {
            _logger = logger;

            InitializeCache(eveCache);
        }
コード例 #3
0
 public static void InitializeCache(IEveLibCache eveCache)
 {
     //if (eZet.EveLib.Core.Config.CacheFactory == null)
     eZet.EveLib.Core.Config.CacheFactory = (arg) => eveCache;
 }
コード例 #4
0
ファイル: ZkbRequestHandler.cs プロジェクト: stiez/evelib
 /// <summary>
 ///     Initializes a new instance of the <see cref="ZkbRequestHandler" /> class.
 /// </summary>
 /// <param name="serializer">The serializer.</param>
 /// <param name="cache">The cache.</param>
 public ZkbRequestHandler(ISerializer serializer, IEveLibCache cache)
 {
     Serializer = serializer;
     Cache      = cache;
 }
コード例 #5
0
        public CharacterNameDict(ICacheLocalProvider cacheProvider, IEveLibCache eveLibCache)
        {
            _cacheProvider = cacheProvider;

            EveApi.InitializeCache(eveLibCache);
        }
コード例 #6
0
        public RefTypeDict(ICacheLocalProvider cacheProvider, IEveLibCache eveLibCache)
        {
            _cacheProvider = cacheProvider;

            EveApi.InitializeCache(eveLibCache);
        }
コード例 #7
0
 public CacheLocalProvider(IEveLibCache eveLibCache)
 {
     _eveLibCache = eveLibCache;
 }