示例#1
0
 /// <summary>
 /// Removes all notifier registrations with any given name.
 /// This method is to be used during application initialization, it does not delete or replace the notifier if already in use!
 /// </summary>
 public static void RemoveAllNotifiers()
 {
     CacheManagerInternals.RemoveAllNotifiers();
 }
示例#2
0
 /// <summary>
 /// Adds or sets a notifier by name
 /// This method is to be used during application initialization, it does not delete or replace the notifier if already in use!
 /// </summary>
 /// <param name="name"></param>
 /// <param name="notifier"></param>
 public static void SetNotifier(string name, ICacheNotifier notifier)
 {
     CacheManagerInternals.SetNotifier(name, notifier);
 }
示例#3
0
 /// <summary>
 /// Removes a notifier registration with a given name.
 /// This method is to be used during application initialization, it does not delete or replace the notifier if already in use!
 /// </summary>
 /// <param name="name"></param>
 public static void RemoveNotifier(string name)
 {
     CacheManagerInternals.RemoveNotifier(name);
 }
示例#4
0
 /// <summary>
 /// Removes a cache registration with a given name.
 /// This method is to be used during application initialization, it does not delete or replace the cache if already in use!
 /// </summary>
 /// <param name="name"></param>
 public static void RemoveConnectionString(string name)
 {
     CacheManagerInternals.RemoveConnectionString(name);
 }
示例#5
0
 /// <summary>
 /// Removes all cache registrations with any given name.
 /// This method is to be used during application initialization, it does not delete or replace the cache if already in use!
 /// </summary>
 public static void RemoveAllConnectionStrings()
 {
     CacheManagerInternals.RemoveAllConnectionStrings();
 }
示例#6
0
 /// <summary>Gets a cache instance using full name of given class</summary>
 /// <remarks>For better performance, store the result in client class</remarks>
 public static ICache GetCache(Type type)
 {
     return(CacheManagerInternals.GetCache(type));
 }
示例#7
0
 public static async Task <ICache> GetCacheAsync(string name)
 {
     return(await CacheManagerInternals.GetCacheAsync(name).ConfigureAwait(false));
 }
示例#8
0
 /// <summary>
 /// Adds or sets a cache by name
 /// This method is to be used during application initialization, it does not delete or replace the cache if already in use!
 /// </summary>
 /// <param name="name"></param>
 /// <param name="cache"></param>
 /// <remarks>Cache name can end with wildcard '*'</remarks>
 public static void SetCache(string name, ICache cache)
 {
     CacheManagerInternals.SetCache(name, cache);
 }
示例#9
0
 /// <summary>
 /// Removes a cache registration with a given name.
 /// This method is to be used during application initialization, it does not delete or replace the cache if already in use!
 /// </summary>
 /// <param name="name"></param>
 public static void RemoveCache(string name)
 {
     CacheManagerInternals.RemoveCache(name);
 }
示例#10
0
 /// <summary>Associates a cache with a notifier</summary>
 /// <param name="cache"></param>
 /// <param name="notifier"></param>
 public static void Associate(ICache cache, ICacheNotifier notifier)
 {
     CacheManagerInternals.Associate(cache, notifier);
 }
示例#11
0
 /// <summary>Gets the notifier that was associated with a cahe</summary>
 /// <param name="cache"></param>
 /// <returns></returns>
 public static ICacheNotifier GetAssociatedNotifier(ICache cache)
 {
     return(CacheManagerInternals.GetAssociatedNotifier(cache));
 }
示例#12
0
 /// <summary>Gets a connection string by name</summary>
 /// <remarks>For better performance, store the result in client class</remarks>
 public static ICacheConnectionString GetConnectionString(string name)
 {
     return(CacheManagerInternals.GetConnectionString(name));
 }
示例#13
0
 /// <summary>Gets a notifier by name</summary>
 /// <remarks>For better performance, store the result in client class</remarks>
 public static ICacheNotifier GetNotifier(string name)
 {
     return(CacheManagerInternals.GetNotifier(name));
 }
示例#14
0
 /// <summary>Gets a cache by name - return a specialized cache implementation type</summary>
 /// <remarks>For better performance, store the result in client class</remarks>
 public static TCache GetCache <TCache>(string name) where TCache : ICache
 {
     return(CacheManagerInternals.GetCache <TCache>(name));
 }
示例#15
0
 /// <summary>Gets a cache instance using full name of calling method's class</summary>
 /// <remarks>For better performance, store the result in client class</remarks>
 public static ICache GetCurrentClassCache()
 {
     return(CacheManagerInternals.GetCurrentClassCache());
 }
示例#16
0
 /// <summary>
 /// Removes all cache registrations with any given name.
 /// This method is to be used during application initialization, it does not delete or replace the cache if already in use!
 /// </summary>
 public static void RemoveAllCaches()
 {
     CacheManagerInternals.RemoveAllCaches();
 }
示例#17
0
 /// <summary>Gets a cache instance using full name of given class</summary>
 /// <remarks>For better performance, store the result in client class</remarks>
 public static ICache GetCache <TClass>()
 {
     return(CacheManagerInternals.GetCache <TClass>());
 }
示例#18
0
 /// <summary>
 /// Adds or sets a cache by name
 /// This method is to be used during application initialization, it does not delete or replace the cache if already in use!
 /// </summary>
 /// <param name="name"></param>
 /// <param name="connectionString"></param>
 /// <remarks>Cache name can end with wildcard '*'</remarks>
 public static void SetConnectionString(string name, ICacheConnectionString connectionString)
 {
     CacheManagerInternals.SetConnectionString(name, connectionString);
 }
示例#19
0
 /// <summary>Gets a list of all cache names</summary>
 /// <remarks>For better performance, store the result in client class</remarks>
 public static IEnumerable <string> GetCacheNames()
 {
     return(CacheManagerInternals.GetCacheNames());
 }
示例#20
0
 /// <summary>Gets a cache by name</summary>
 /// <remarks>For better performance, store the result in client class</remarks>
 public static ICache GetCache(string name)
 {
     return(CacheManagerInternals.GetCache(name));
 }