private static string GetPath(int iBrwID, FindAppDelegate f) { string strPath; if (m_dictPaths.TryGetValue(iBrwID, out strPath)) { return(strPath); } try { strPath = f(); } catch (Exception) { strPath = null; } m_dictPaths[iBrwID] = strPath; return(strPath); }
private static string GetPath(int iBrwID, FindAppDelegate f) { string strPath; if(m_dictPaths.TryGetValue(iBrwID, out strPath)) return strPath; try { strPath = f(); if((strPath != null) && (strPath.Length == 0)) strPath = null; } catch(Exception) { strPath = null; } m_dictPaths[iBrwID] = strPath; return strPath; }