public static int GetCloneSitePartOrder(Type type) { if (type == null) { return(int.MaxValue); } CloneSitePartAttribute cloneSitePartOrderAttribute = type.GetCustomAttribute <CloneSitePartAttribute>(); return(cloneSitePartOrderAttribute != null ? cloneSitePartOrderAttribute.Order : int.MaxValue); }
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()); }