StaticLocalizableComboboxItemSource.cs 649 B

12345678910111213141516171819202122232425
  1. using System;
  2. using System.Collections.Generic;
  3. namespace Abp.UI.Inputs
  4. {
  5. public class StaticLocalizableComboboxItemSource : ILocalizableComboboxItemSource
  6. {
  7. public ICollection<ILocalizableComboboxItem> Items { get; private set; }
  8. public StaticLocalizableComboboxItemSource(params ILocalizableComboboxItem[] items)
  9. {
  10. if (items == null)
  11. {
  12. throw new ArgumentNullException("items");
  13. }
  14. if (items.Length <= 0)
  15. {
  16. throw new ArgumentException("Items can not be empty!");
  17. }
  18. Items = items;
  19. }
  20. }
  21. }