コード例 #1
0
 public EnumChoiceFormView(
     T defaultValue, Func <T, string> getLabel,
     Action <EnumChoiceFormView <T> > postInitialization = null)
 {
     Choice = RadioBasedSingleChoiceUtilExtensions.BuildForEnum(defaultValue, getLabel);
     postInitialization?.Invoke(this);
 }
コード例 #2
0
        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);
        }