本文整理汇总了C#中ICacheProvider类的典型用法代码示例。如果您正苦于以下问题:C# ICacheProvider类的具体用法?C# ICacheProvider怎么用?C# ICacheProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ICacheProvider类属于命名空间,在下文中一共展示了ICacheProvider类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HttpResourceProvider
private HttpResourceProvider(ICacheProvider cacheProvider, string applicationName, string resourceSet, Uri lemonadeServiceUri)
{
_cacheProvider = cacheProvider;
_applicationName = applicationName;
_resourceSet = resourceSet;
_restClient = new RestClient(lemonadeServiceUri);
}
示例2: IdentityService
public IdentityService(IWeddingBiddersUow uow, IEncryptionService encryptionService, ISessionService sessionService, ICacheProvider cacheProvider)
: base(cacheProvider)
{
this.uow = uow;
this.sessionService = sessionService;
this.encryptionService = encryptionService;
}
示例3: IdentityService
public IdentityService(IVideoOnDemandUow uow, IEncryptionService encryptionService, ISessionService sessionService, ICacheProvider cacheProvider)
: base(cacheProvider)
{
this.uow = uow;
this.sessionService = sessionService;
this.encryptionService = encryptionService;
}
示例4: BlogController
public BlogController(ILogger<BlogController> logger, IPostManager postManager, IPortfolioManager portfolioManager, ICacheProvider cacheProvider)
{
this.logger = logger;
this.cacheProvider = cacheProvider;
this.postManager = postManager;
this.portfolioManager = portfolioManager;
}
示例5: ResourceXmlConfigurationProvider
public ResourceXmlConfigurationProvider(ICacheProvider cacheProvider, string configurationPath, IVirtualPathResolver virtualPathResolver, IResourceCacher resourceCacher)
{
if (cacheProvider == null)
{
throw new ArgumentNullException("cacheProvider");
}
if (resourceCacher == null)
{
throw new ArgumentNullException("resourceCacher");
}
if (string.IsNullOrEmpty(configurationPath) && virtualPathResolver == null)
{
throw new ArgumentNullException("configurationPath");
}
m_CacheProvider = cacheProvider;
m_VirtualPathResolver = virtualPathResolver;
m_ResourceCacher = resourceCacher;
m_XmlConfigurationPathProvider = new Lazy<string>(
() =>
{
if (string.IsNullOrWhiteSpace(configurationPath))
{
configurationPath = m_VirtualPathResolver.Resolve("~/App_Data/WebResources.xml");
}
m_ResourceCacher.AddDependentFile(configurationPath);
return configurationPath;
},
true);
}
示例6: IdentityService
public IdentityService(ILearnWithQBUow uow, IEncryptionService encryptionService, ISessionService sessionService, ICacheProvider cacheProvider)
: base(cacheProvider)
{
this.uow = uow;
this.sessionService = sessionService;
this.encryptionService = encryptionService;
}
示例7: AlbumCacheTask
public AlbumCacheTask(ILastfmClientFactory lastfmFactory, IS3ClientFactory s3Factory, ICacheProvider cacheProvider, ILogger<AlbumCacheTask> logger)
{
this.s3Client = s3Factory.CreateS3Client();
this.lastfmClient = lastfmFactory.CreateLastfmClient();
this.cacheProvider = cacheProvider;
this.logger = logger;
}
示例8: AppContext
public AppContext(ILogger logger, ICacheProvider cache)
{
//Environment = new EnvironmentPH();
Logger = logger;
Cache = cache;
Settings = new AppSettings();
}
示例9: GenerateAllCourses
public static void GenerateAllCourses(ICourseStorage courseStorage, ICacheProvider cacheProvider)
{
var path = (new System.Uri(Assembly.GetExecutingAssembly().CodeBase)).AbsolutePath;
path = path.Replace("IUDICO.LMS/Plugins/IUDICO.DataGenerator.DLL", "IUDICO.DataGenerator/Content/Courses/");
if (Directory.Exists(path))
{
var files = Directory.GetFiles(path, "*.zip",SearchOption.TopDirectoryOnly);
foreach (var file in files)
{
var name = Path.GetFileNameWithoutExtension(file);
if (!courseStorage.GetCourses().Any(c => c.Name == name && c.Owner == "prof3"))
{
courseStorage.Import(file, "prof3");
Course course = courseStorage.GetCourses().SingleOrDefault(c => c.Name == name && c.Owner == "prof3");
if (course != null && course.Locked.Value)
{
courseStorage.Parse(course.Id);
cacheProvider.Invalidate("course-" + course.Id, "courses");
}
}
}
}
}
示例10: RespiratoryController
public RespiratoryController([Named("FileDependency")]ICacheProvider cache, IReadEquationData<Equation> readEquationData,IMathExpressionParser mathExpressionParser,IMyLogger logger)
{
this.myLogger = logger;
this.Cache = cache;
this.ReadEquationData = readEquationData;
this.MathExpressionParser = mathExpressionParser;
}
示例11: CachedUserService
public CachedUserService(IUserService userService, ICacheProvider cacheProvider, IUserStorePathProvider userStorePathProvider)
{
_userService = userService;
_cacheProvider = cacheProvider;
_optoutCacheFileName = userStorePathProvider.GetOptoutFileName();
_optinCacheFileName = userStorePathProvider.GetOptinFileName();
}
示例12: CacheInterceptor
/// <summary>
/// Initializes a new instance of the <see cref="CacheInterceptor" /> class.
/// </summary>
/// <param name="cacheProvider">The cache provider.</param>
/// <param name="cachingIsEnabled">if set to <c>true</c> caching is enabled.</param>
/// <param name="cacheTimeoutSeconds">The cache timeout seconds.</param>
public CacheInterceptor(ICacheProvider cacheProvider, bool cachingIsEnabled, int cacheTimeoutSeconds, bool logCacheHits)
{
this.cacheProvider = cacheProvider;
this.cachingIsEnabled = cachingIsEnabled;
this.cacheTimeout = TimeSpan.FromSeconds(cacheTimeoutSeconds);
this.logCacheHits = logCacheHits;
}
示例13: CacheAspect
protected internal CacheAspect(ICacheProvider cacheProvider)
{
if (cacheProvider == null)
throw new ArgumentNullException("cacheProvider");
this.Cache = cacheProvider;
}
示例14: AppCache
/// <summary>
/// Default constructor.
/// </summary>
/// <param name="container">The current cache provider</param>
public AppCache(ICacheProvider provider) {
Authors = new ModelCache<Models.Author>(provider, a => a.Id.Value, a => a.Email);
Categories = new ModelCache<Models.Category>(provider, c => c.Id.Value, c => c.Slug);
Params = new ModelCache<Models.Param>(provider, p => p.Id.Value, p => p.InternalId);
Posts = new ModelCache<Models.Post>(provider, p => p.Id.Value, p => p.Slug);
Tags = new ModelCache<Models.Tag>(provider, t => t.Id.Value, t => t.Slug);
}
示例15: AspNetDatingChatRoomProvider
public AspNetDatingChatRoomProvider(IChatUserProvider chatUserProvider, ICacheProvider cacheProvider)
{
this.chatUserProvider = chatUserProvider;
this.cacheProvider = cacheProvider;
mainChatRoom = new Room
{
Id = "-1",
MaxUsers = MaxUsers,
Name = "Main Chat",
Password = null,
Topic = "Welcome to chat!",
Visible = true
};
messengerChatRoom = new Room
{
Id = "-2",
MaxUsers = Int32.MaxValue,
Name = "Messenger",
Password = null,
Topic = "Welcome to chat!",
Visible = false
};
}