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()); }
public static IObservable <StateChange <InputSelectEntity, EntityState <InputSelectAttributes> > > StateAllChangesWithCurrent(this InputSelectEntity entity) { return(entity.StateAllChangesWithCurrent <InputSelectEntity, EntityState <InputSelectAttributes>, InputSelectAttributes>()); }
public static bool IsNotOption(this InputSelectEntity target, Enum @option) { return(target.State != @option.ToString()); }