コード例 #1
0
        public static int GetCloneSitePartOrder(Type type)
        {
            if (type == null)
            {
                return(int.MaxValue);
            }
            CloneSitePartAttribute cloneSitePartOrderAttribute = type.GetCustomAttribute <CloneSitePartAttribute>();

            return(cloneSitePartOrderAttribute != null ? cloneSitePartOrderAttribute.Order : int.MaxValue);
        }
コード例 #2
0
        public static string GetCloneSitePartDisplayName(Type type)
        {
            if (type == null)
            {
                return(string.Empty);
            }
            CloneSitePartAttribute cloneSitePartOrderAttribute = type.GetCustomAttribute <CloneSitePartAttribute>();

            return(cloneSitePartOrderAttribute != null && !string.IsNullOrWhiteSpace(cloneSitePartOrderAttribute.Name)
                ? cloneSitePartOrderAttribute.Name
                : type.Name.BreakUpString());
        }