示例#1
0
        /// <summary>
        /// 获取 Action 用户友好名称
        /// </summary>
        /// <param name="x"></param>
        /// <param name="mapping"></param>
        /// <returns></returns>
        public static string GetFriendlyName(this ActionDescriptor x, Dictionary <string, string> mapping = null)
        {
            var    key = x.ActionName;
            string value;

            // 获取映射
            mapping.TryGetValue(key, out value);
            if (string.IsNullOrEmpty(value))
            {
                value = x.GetDisplayName() ?? x.ActionName;
            }
            return(value);
        }