Exemplo n.º 1
0
 private static ForumSection GetForumSection(string _ForumAddress)
 {
     lock (_sm_ForumSectionLock)
     {
         if (_sm_ForumSections == null)
         {
             if (System.IO.File.Exists(StaticValues.LauncherSettingsDirectory + "DownloadedForumCache.dat") == true)
             {
                 if (Utility.LoadSerialize(StaticValues.LauncherSettingsDirectory + "DownloadedForumCache.dat", out _sm_ForumSections) == false)
                 {
                     _sm_ForumSections = null;
                 }
             }
             if (_sm_ForumSections == null)
             {
                 _sm_ForumSections = new Dictionary <string, ForumSection>();
             }
         }
         if (_sm_ForumSections.ContainsKey(_ForumAddress) == false)
         {
             _sm_ForumSections.Add(_ForumAddress, new ForumSection {
                 m_ForumSectionURL = _ForumAddress
             });
         }
     }
     return(_sm_ForumSections[_ForumAddress]);
 }