Exemplo n.º 1
0
 public static CachedTypeOption GetCacheEntryOption <T>(this ICachedTypeOptionsProvider cacheEntryOptionsProvider)
 => cacheEntryOptionsProvider.GetCacheEntryOption(typeof(T));
Exemplo n.º 2
0
 public static CachedTypeOption GetCacheEntryOption(this ICachedTypeOptionsProvider cacheEntryOptionsProvider, Type type)
 => cacheEntryOptionsProvider.GetCacheEntryOption(type.FullName);
 /// <summary>
 /// Initializes a new instance of the <see cref="CachedTypeProvider{T}"/> class.
 /// </summary>
 /// <param name="memoryCache">The memory cache service to use.</param>
 /// <param name="cacheEntryOptionsProvider">The options to provide the memory cache entries.</param>
 public CachedTypeProvider(IMemoryCache memoryCache, ICachedTypeOptionsProvider cacheEntryOptionsProvider)
 {
     MemoryCache = memoryCache;
     CacheEntryOptionsProvider = cacheEntryOptionsProvider;
 }