protected override TaskList GetTaskList(IServiceProvider serviceProvider, ModulePageInfo selectedModulePage) { var connection = (Connection)serviceProvider.GetService(typeof(Connection)); var serverManager = new ServerManager(); var siteName = connection.ConfigurationPath.SiteName; var virtualPath = connection.ConfigurationPath.ApplicationPath + connection.ConfigurationPath.FolderPath; BpmOnlineSite site; try { site = new BpmOnlineSite(serverManager, siteName, virtualPath); } catch (Exception) { return(null); } if (site.ConnectionStringsConfig == null) { return(null); } if (_lastConfigPath != connection.ConfigurationPath || _cachedTaskList == null) { _lastConfigPath = connection.ConfigurationPath; _cachedTaskList = new BpmOnlineHomepageTaskList(this, MethodTaskItemUsages.TaskList, site); } return(_cachedTaskList); }
internal void ClearCache() { _lastConfigPath = null; _cachedTaskList = null; }