/// <summary>
        /// 修改配置名称
        /// </summary>
        /// <param name="templateID">模板ID</param>
        /// <param name="newName">新模板名称</param>
        public void RenameConfig(string templateID, string newName)
        {
            var entity = TemplateList.First(p => p.ID.Equals(templateID));

            if (entity != null)
            {
                entity.Name = newName;
                SaveData();
            }
        }
Exemple #2
0
        /// <summary>
        /// 删除参数
        /// </summary>
        /// <param name="key">参数名称</param>
        /// <returns>成功返回true</returns>
        public void Remove(string key)
        {
            var entity = ParamData.First(p => p.Key.Equals(key));

            if (entity != null)
            {
                Delete(entity);
                ParamData.Remove(entity);
            }
        }
Exemple #3
0
 public static ConfigEntity Get(string name)
 {
     return(ConfigData.First(p => p.Name.Equals(name)));
 }
Exemple #4
0
 /// <summary>
 /// 获取实体元数据
 /// </summary>
 /// <param name="name">实体名称</param>
 public EntityMetadata Get(object name)
 {
     return(MetadataList.First(p => p.Name.Equals(name)));
 }