コード例 #1
0
ファイル: DistributedCache.cs プロジェクト: a280238558/lms
        public DistributedCache(
            IOptions <LmsDistributedCacheOptions> distributedCacheOption,
            IDistributedCache cache,
            ICancellationTokenProvider cancellationTokenProvider,
            IDistributedCacheSerializer serializer,
            IDistributedCacheKeyNormalizer keyNormalizer)
        {
            _distributedCacheOption = distributedCacheOption.Value;
            Cache = cache;
            CancellationTokenProvider = cancellationTokenProvider;
            Logger        = NullLogger <DistributedCache <TCacheItem, TCacheKey> > .Instance;
            Serializer    = serializer;
            KeyNormalizer = keyNormalizer;

            SyncSemaphore = new SemaphoreSlim(1, 1);

            SetDefaultOptions();
        }
コード例 #2
0
 public DistributedCacheKeyNormalizer(
     IOptions <LmsDistributedCacheOptions> distributedCacheOptions)
 {
     DistributedCacheOptions = distributedCacheOptions.Value;
 }