示例#1
0
文件: DDIUtils.cs 项目: ssjda-ddi/EDO
        private static RenameResult RenameId(IIDPropertiesProvider obj, string propertyName, List <string> ids)
        {
            RenameResult result = new RenameResult(propertyName);
            string       id     = (string)PropertyPathHelper.GetValue(obj, propertyName);

            if (ids.Contains(id))
            {
                string newId = IDUtils.NewGuid();
                PropertyPathHelper.SetValue(obj, propertyName, newId);
                result.OldId = id;
                result.NewId = newId;
                return(result);
            }
            return(result);
        }