/// <summary> /// 初始化文件修改时间和对象实例 /// </summary> static MemCachedConfigFileManager() { if (Utils.FileExists(ConfigFilePath)) { m_fileoldchange = System.IO.File.GetLastWriteTime(ConfigFilePath); m_configinfo = (MemCachedConfigInfo)DefaultConfigFileManager.DeserializeInfo(ConfigFilePath, typeof(MemCachedConfigInfo)); } }
/// <summary> /// 初始化文件修改时间和对象实例 /// </summary> static DbSnapConfigFileManager() { if (Utils.FileExists(ConfigFilePath)) { m_fileoldchange = System.IO.File.GetLastWriteTime(ConfigFilePath); m_dbSnapAppConfig = (DbSnapAppConfig)DefaultConfigFileManager.DeserializeInfo(ConfigFilePath, typeof(DbSnapAppConfig)); } }
static DiscuzCloudConfigFileManager() { if (!Utils.FileExists(ConfigFilePath)) { SerializationHelper.Save(DiscuzCloudConfigInfo.CreateInstance(), ConfigFilePath); } m_fileOldChange = System.IO.File.GetLastWriteTime(ConfigFilePath); m_configInfo = (DiscuzCloudConfigInfo)DefaultConfigFileManager.DeserializeInfo(ConfigFilePath, typeof(DiscuzCloudConfigInfo)); }
static ForumHotConfigFileManager() { if (!Utils.FileExists(ConfigFilePath)) { SerializationHelper.Save(ForumHotConfigInfo.CreateInstance(), ConfigFilePath); } m_fileoldchange = System.IO.File.GetLastWriteTime(ConfigFilePath); m_configinfo = (ForumHotConfigInfo)DefaultConfigFileManager.DeserializeInfo(ConfigFilePath, typeof(ForumHotConfigInfo)); }
/// <summary> /// 初始化文件修改时间和对象实例 /// </summary> static MyAttachmentsTypeConfigFileManager() { m_fileoldchange = System.IO.File.GetLastWriteTime(ConfigFilePath); try { m_configinfo = (MyAttachmentsTypeConfigInfo)DefaultConfigFileManager.DeserializeInfo(ConfigFilePath, typeof(MyAttachmentsTypeConfigInfo)); } catch { if (File.Exists(ConfigFilePath)) { ReviseConfig(); m_configinfo = (MyAttachmentsTypeConfigInfo)DefaultConfigFileManager.DeserializeInfo(ConfigFilePath, typeof(MyAttachmentsTypeConfigInfo)); } } }
/// <summary> /// 初始化文件修改时间和对象实例 /// </summary> static BaseConfigFileManager() { m_fileoldchange = System.IO.File.GetLastWriteTime(ConfigFilePath); m_configinfo = (BaseConfigInfo)DefaultConfigFileManager.DeserializeInfo(ConfigFilePath, typeof(BaseConfigInfo)); }