コード例 #1
0
 public static void SetEntityCache(EntityCache entityCache)
 {
     iniFile.DelSection("EntityCache");
     if (entityCache != null)
     {
         iniFile.SetSectionValue("EntityCache", StringHelper.ToViewJSON(entityCache));
     }
 }
コード例 #2
0
ファイル: fmDbSererManager.cs プロジェクト: mxq00812314/MXQ
        /// <summary>
        /// 删除保存的服务器
        /// </summary>
        /// <param name="serverName"></param>
        public void DelServer(string serverName)
        {
            var serverList = GetDbServerList();

            iniFile.DelSection("DbServerList");
            foreach (var server in serverList)
            {
                if (server.DbServerName == serverName)
                {
                    iniFile.DelSection(server.DbServerName);
                }
                else
                {
                    iniFile.SetSectionValue("DbServerList", server.DbServerName);
                }
            }
            BindServerList();
        }