static void _userSessionCacheManager_ItemNotFound(object sender, CacheItemNotFoundArgs e) { if (Instance != null) { UserSession session = Instance.RaiseSessionRequired(e.Name); if (session != null) { e.CachedItem = new CacheItem(e.Name, session); } } }
private CacheItem RaiseItemNotFound(string name) { CacheItem Result = null; if (ItemNotFound != null) { CacheItemNotFoundArgs args = new CacheItemNotFoundArgs(name); ItemNotFound(this, args); Result = args.CachedItem; } return(Result); }