当前位置: 首页>>代码示例>>C#>>正文


C# ICacheProvider类代码示例

本文整理汇总了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);
 }
开发者ID:thesheps,项目名称:lemonade,代码行数:7,代码来源:HttpResourceResolver.cs

示例2: IdentityService

 public IdentityService(IWeddingBiddersUow uow, IEncryptionService encryptionService, ISessionService sessionService, ICacheProvider cacheProvider)
     : base(cacheProvider)
 {
     this.uow = uow;
     this.sessionService = sessionService;
     this.encryptionService = encryptionService;
 }
开发者ID:QuinntyneBrown,项目名称:wedding-bidders,代码行数:7,代码来源:IdentityService.cs

示例3: IdentityService

 public IdentityService(IVideoOnDemandUow uow, IEncryptionService encryptionService, ISessionService sessionService, ICacheProvider cacheProvider)
     : base(cacheProvider)
 {
     this.uow = uow;
     this.sessionService = sessionService;
     this.encryptionService = encryptionService;
 }
开发者ID:QuinntyneBrown,项目名称:VideoOnDemandApi,代码行数:7,代码来源:IdentityService.cs

示例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;
 }
开发者ID:alanedwardes,项目名称:aeblog,代码行数:7,代码来源:BlogController.cs

示例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);
        }
开发者ID:LaboFoundation,项目名称:Labo.WebSiteOptimizer,代码行数:35,代码来源:ResourceXmlConfigurationProvider.cs

示例6: IdentityService

 public IdentityService(ILearnWithQBUow uow, IEncryptionService encryptionService, ISessionService sessionService, ICacheProvider cacheProvider)
     : base(cacheProvider)
 {
     this.uow = uow;
     this.sessionService = sessionService;
     this.encryptionService = encryptionService;
 }
开发者ID:QuinntyneBrown,项目名称:learn-with-qb,代码行数:7,代码来源:IdentityService.cs

示例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;
 }
开发者ID:alanedwardes,项目名称:aeblog,代码行数:7,代码来源:AlbumCacheTask.cs

示例8: AppContext

 public AppContext(ILogger logger, ICacheProvider cache)
 {
     //Environment = new EnvironmentPH();
     Logger = logger;
     Cache = cache;
     Settings = new AppSettings();
 }
开发者ID:rivardja,项目名称:ph-onion-demo,代码行数:7,代码来源:AppContext.cs

示例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");
                  }
               }
            }
         }
      }
开发者ID:supermuk,项目名称:iudico,代码行数:27,代码来源:CourseGenerator.cs

示例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;
 }
开发者ID:vboyz2knight,项目名称:DemoMVC,代码行数:7,代码来源:RespiratoryController.cs

示例11: CachedUserService

 public CachedUserService(IUserService userService, ICacheProvider cacheProvider, IUserStorePathProvider userStorePathProvider)
 {
     _userService = userService;
     _cacheProvider = cacheProvider;
     _optoutCacheFileName = userStorePathProvider.GetOptoutFileName();
     _optinCacheFileName = userStorePathProvider.GetOptinFileName();
 }
开发者ID:medvekoma,项目名称:portfotolio,代码行数:7,代码来源:CachedUserService.cs

示例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;
 }
开发者ID:jioe,项目名称:appverse-net,代码行数:13,代码来源:CacheInterceptor.cs

示例13: CacheAspect

        protected internal CacheAspect(ICacheProvider cacheProvider)
        {
            if (cacheProvider == null)
                throw new ArgumentNullException("cacheProvider");

            this.Cache = cacheProvider;
        }
开发者ID:vgribok,项目名称:Aspectacular,代码行数:7,代码来源:CacheAspect.cs

示例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);
		}
开发者ID:nguyenhoangthanh,项目名称:Goldfish,代码行数:11,代码来源:AppCache.cs

示例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
            };
        }
开发者ID:varlo,项目名称:Unona9,代码行数:25,代码来源:AspNetDatingChatRoomProvider.cs


注:本文中的ICacheProvider类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。