public EnumChoiceFormView( T defaultValue, Func <T, string> getLabel, Action <EnumChoiceFormView <T> > postInitialization = null) { Choice = RadioBasedSingleChoiceUtilExtensions.BuildForEnum(defaultValue, getLabel); postInitialization?.Invoke(this); }
public SingleRadioBasedChoiceFormView( T defaultValue, Func <T, string> getLabel, Func <int, T> intToItem, Func <T, int> itemToInt, Action <SingleRadioBasedChoiceFormView <T> > postInitialization = null) { _getLabel = getLabel; _itemToInt = itemToInt; Choice = RadioBasedSingleChoiceUtilExtensions.Build <T, HTMLElement>( defaultValue, getLabel, intToItem, itemToInt); postInitialization?.Invoke(this); }