Esempio n. 1
0
        protected EnumerationSelectionFactory(bool flag, IFlagHelper flagHelper, LocalizationService localizationService) : base(localizationService)
        {
            if (flagHelper == null)
            {
                throw new ArgumentNullException(nameof(flagHelper));
            }

            var isFlag = flagHelper.IsFlag <T>();

            if (!flag && isFlag)
            {
                throw new ArgumentException($"T can not have a flag-attribute. Inherit from \"{typeof(FlagSelectionFactory<T>)}\" instead.");
            }

            if (flag && !isFlag)
            {
                throw new ArgumentException("T must have a flag-attribute.");
            }
        }
Esempio n. 2
0
 public PaginationModesSelectionFactory(IFlagHelper flagHelper, LocalizationService localizationService) : base(flagHelper, localizationService)
 {
 }
Esempio n. 3
0
 protected FlagSelectionFactory(IFlagHelper flagHelper, LocalizationService localizationService) : base(true, flagHelper, localizationService)
 {
 }
Esempio n. 4
0
 public PaginationSettingsBlock(IFlagHelper flagHelper)
 {
     this.FlagHelper = flagHelper ?? throw new ArgumentNullException(nameof(flagHelper));
 }
Esempio n. 5
0
 protected EnumerationSelectionFactory(IFlagHelper flagHelper, LocalizationService localizationService) : this(false, flagHelper, localizationService)
 {
 }