コード例 #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="item"></param>
        /// <param name="cultureInfo"></param>
        /// <returns></returns>
        public static string Get(Enum item, CultureInfo cultureInfo)
        {
            if (item == null)
            {
                return(string.Empty);
            }

            var key = EnumSynonymProviderHelper.GetEnumKey(item);

            return(SynonymStorage?.Get(key, cultureInfo) ?? key);
        }
コード例 #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="item"></param>
        /// <returns></returns>
        public static SynonymInfo GetInfo(Enum item)
        {
            var key = EnumSynonymProviderHelper.GetEnumKey(item);

            return(GetInfo(key));
        }