Class ComparisonTypeSelectorComponent<TComparisonEnum>
Selector component for enums specifying comparison type. The selected value is represented by its corresponding underlying type value.
public abstract class ComparisonTypeSelectorComponent<TComparisonEnum> : FormComponent<ComparisonTypeSelectorProperties<TComparisonEnum>, TComparisonEnum>
Type Parameters
TComparisonEnum
Type of enum whose values the component offers.
- Inheritance
-
objectFormComponent<ComparisonTypeSelectorProperties<TComparisonEnum>, TComparisonEnum>ComparisonTypeSelectorComponent<TComparisonEnum>
- Derived
- Inherited Members
- Extension Methods
Properties
ComparisonType
Represents the selector value in the resulting HTML.
public TComparisonEnum ComparisonType { get; set; }
Property Value
- TComparisonEnum
HtmlOptions
Gets enumeration of available comparison types to populate the selector.
public IEnumerable<HtmlOptionItem> HtmlOptions { get; }
Property Value
- IEnumerable<HtmlOptionItem>
LabelForPropertyName
Gets name of the ComparisonType property.
public override string LabelForPropertyName { get; }
Property Value
- string
Methods
GetComparisonTypeOptions()
Gets enumeration of select list items whose value is the underlying type's value and text is a localized enum value. Item whose value corresponds to ComparisonType has its Selected flag set to true.
protected virtual IEnumerable<HtmlOptionItem> GetComparisonTypeOptions()
Returns
- IEnumerable<HtmlOptionItem>
GetResourceStringNamePrefix(string)
Gets resource string name prefix for enum named enumName
.
protected virtual string GetResourceStringNamePrefix(string enumName)
Parameters
enumName
string
Returns
- string
GetValue()
Gets value representing the currently selected enum value.
public override TComparisonEnum GetValue()
Returns
- TComparisonEnum
SetValue(TComparisonEnum)
Sets the currently selected enum value.
public override void SetValue(TComparisonEnum value)
Parameters
value
TComparisonEnumEnum value.