A style that displays errors as a list.
Inheritance: ErrorDisplayStyle
Esempio n. 1
0
 IEnumerable <Control> ErrorDisplayStyle.GetControls(IEnumerable <string> errors)
 {
     return(errors.Any()
                                ? new Section(heading, ListErrorDisplayStyle.GetErrorMessageListBlock(ImmutableArray <string> .Empty, errors).ToSingleElementArray(), style: style)
            .ToSingleElementArray()
                                : new Control[0]);
 }
Esempio n. 2
0
 IEnumerable <Control> ErrorDisplayStyle.GetControls(IEnumerable <string> errors)
 {
     return(errors.Any()
                                ? new Section(heading, ListErrorDisplayStyle.GetErrorMessageListBlock(ImmutableArray <string> .Empty, errors).ToCollection(), style: style)
            .ToCollection()
                                : Enumerable.Empty <Control>());
 }
Esempio n. 3
0
 private DisplayableElementLocalData getErrorFocusableElementLocalData(
     ElementContext context, string elementName, IReadOnlyCollection <ElementAttribute> attributes) =>
 ListErrorDisplayStyle.GetErrorFocusableElementLocalData(context, elementName, ErrorSourceSet, attributes);