private void guaranteeHashExists() { if (cache == null) { lock (locker) { if (cache == null) { cache = new MainObjectCache(); } } } }
private void guaranteeHashExists() { if (_cache == null) { lock (_locker) { if (_cache == null) { _cache = new MainObjectCache(); } } } }
public IObjectCache FindCache() { var dictionary = findHttpDictionary(); if (!dictionary.Contains(RRITEM_NAME)) { lock (dictionary.SyncRoot) { if (!dictionary.Contains(RRITEM_NAME)) { var cache = new MainObjectCache(); dictionary.Add(RRITEM_NAME, cache); return cache; } } } return (IObjectCache)dictionary[RRITEM_NAME]; }
public IObjectCache FindCache() { IDictionary items = findHttpDictionary(); if (!items.Contains(ITEM_NAME)) { lock (items.SyncRoot) { if (!items.Contains(ITEM_NAME)) { var cache = new MainObjectCache(); items.Add(ITEM_NAME, cache); return cache; } } } return (IObjectCache) items[ITEM_NAME]; }
public IObjectCache FindCache() { IDictionary items = findHttpDictionary(); if (!items.Contains(ITEM_NAME)) { lock (items.SyncRoot) { if (!items.Contains(ITEM_NAME)) { var cache = new MainObjectCache(); items.Add(ITEM_NAME, cache); return(cache); } } } return((IObjectCache)items[ITEM_NAME]); }
public void SetUp() { cache = new MainObjectCache(); }