/// <summary> /// Gets display name /// </summary> /// <param name="functionality"></param> /// <returns></returns> public static string GetDisplayName(Functionality functionality) { if (_displayNames == null) { InitDisplayNames(); } if (_displayNames.ContainsKey(functionality)) { return(_displayNames[functionality]); } else { return(functionality.ToString()); } }
/// <summary> /// Gets display name /// </summary> /// <param name="functionality"></param> /// <returns></returns> public static string GetDisplayName(Functionality functionality) { if (_functionalityInfos == null) { InitDisplayNames(); } if (_functionalityInfos.ContainsKey(functionality)) { var funcInfo = _functionalityInfos[functionality]; var funcName = string.IsNullOrEmpty(funcInfo.Name) ? functionality.ToString() : funcInfo.Name; if (string.IsNullOrEmpty(funcInfo.ServiceName)) { return(funcName); } return(string.Format("{0} ({1})", funcName, funcInfo.ServiceName)); } else { return(functionality.ToString()); } }