Пример #1
0
        private static string GetRadioLabelText(Type enumType, object enumValue)
        {
            string textFromAttribute = GovUkRadioCheckboxLabelTextAttribute.GetValueForEnum(enumType, enumValue);

            string radioLabel = textFromAttribute ?? enumValue.ToString();

            return(radioLabel);
        }
        private static string GetCheckboxLabelText <TEnum>(
            TEnum enumValue)
            where TEnum : struct, IConvertible
        {
            string textFromAttribute = GovUkRadioCheckboxLabelTextAttribute.GetValueForEnum(typeof(TEnum), enumValue);

            string checkboxLabel = textFromAttribute ?? enumValue.ToString();

            return(checkboxLabel);
        }