コード例 #1
0
 public static ReflectionInoCore <V> GetInstance()
 {
     if (_instance == null)
     {
         lock (_instanceLock)
             if (_instance == null)
             {
                 _instance = new ReflectionInoCore <V>();
                 Action addItem = () => { ReflectionInoCore <V> .GetInstance().RemoveAllCache(); };
                 ReflectionInoHelper.AddRemoveFunc(addItem);
             }
     }
     return(_instance);
 }
コード例 #2
0
 public void RemoveCache <T>(string key)
 {
     ReflectionInoCore <T> .GetInstance().Remove(key);
 }
コード例 #3
0
 public void RemoveCacheAll <T>()
 {
     ReflectionInoCore <T> .GetInstance().RemoveAllCache();
 }
コード例 #4
0
 public V GetOrCreate <V>(string cacheKey, Func <V> create, int cacheDurationInSeconds = int.MaxValue)
 {
     return(ReflectionInoCore <V> .GetInstance().GetOrCreate(cacheKey, create));
 }
コード例 #5
0
 public IEnumerable <string> GetAllKey <V>()
 {
     return(ReflectionInoCore <V> .GetInstance().GetAllKey());
 }
コード例 #6
0
 public V Get <V>(string key)
 {
     return(ReflectionInoCore <V> .GetInstance().Get(key));
 }
コード例 #7
0
 public bool ContainsKey <V>(string key)
 {
     return(ReflectionInoCore <V> .GetInstance().ContainsKey(key));
 }
コード例 #8
0
 public void Add <V>(string key, V value, int cacheDurationInSeconds)
 {
     ReflectionInoCore <V> .GetInstance().Add(key, value, cacheDurationInSeconds);
 }
コード例 #9
0
 public void Add <V>(string key, V value)
 {
     ReflectionInoCore <V> .GetInstance().Add(key, value);
 }