Пример #1
0
    public static void SelectOption <T>(this InputSelectEntity target, T @option)
        where T : Enum
    {
        if (string.IsNullOrEmpty(option.ToString()))
        {
            throw new NullReferenceException();
        }

        // if (!nameof(T).Contains(nameof(target)))
        //     throw new ArrayTypeMismatchException();

        target.SelectOption(option.ToString());
    }
Пример #2
0
 public static IObservable <StateChange <InputSelectEntity, EntityState <InputSelectAttributes> > > StateAllChangesWithCurrent(this InputSelectEntity entity)
 {
     return(entity.StateAllChangesWithCurrent <InputSelectEntity, EntityState <InputSelectAttributes>, InputSelectAttributes>());
 }
Пример #3
0
 public static bool IsNotOption(this InputSelectEntity target, Enum @option)
 {
     return(target.State != @option.ToString());
 }