public BackgroundWorkerTokenCacheAdapter(string cacheKey,
                                          IDistributedCache distributedCache,
                                          ILogger <MsalDistributedTokenCacheAdapter> logger,
                                          IOptions <MsalDistributedTokenCacheAdapterOptions> cacheOptions)
     : base(distributedCache, cacheOptions, logger)
 {
     _cacheKey         = cacheKey;
     _distributedCache = distributedCache;
     _cacheOptions     = cacheOptions?.Value;
 }
Beispiel #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="BenchmarkMsalDistributedTokenCacheAdapter"/> class.
        /// </summary>
        /// <param name="memoryCache">Distributed cache instance to use.</param>
        /// <param name="cacheOptions">Options for the token cache.</param>

        public BenchmarkMsalDistributedTokenCacheAdapter(
            IDistributedCache memoryCache,
            IOptions <MsalDistributedTokenCacheAdapterOptions> cacheOptions)
        {
            if (cacheOptions == null)
            {
                throw new ArgumentNullException(nameof(cacheOptions));
            }

            _distributedCache = memoryCache;
            _cacheOptions     = cacheOptions.Value;
        }