Пример #1
0
 public LocalizationResourceApiTreeModel(
     List <LocalizationResource> resources,
     IEnumerable <CultureInfo> languages,
     int popupTitleLength,
     int listDisplayLength,
     UiOptions options) : base(languages)
 {
     _popupTitleLength  = popupTitleLength;
     _listDisplayLength = listDisplayLength;
     Resources          = ConvertToApiModel(resources);
     Options            = options;
 }
Пример #2
0
        public LocalizationResourceApiModel(ICollection <LocalizationResource> resources, IEnumerable <CultureInfo> languages, int popupTitleLength, int listDisplayLength)
        {
            if (resources == null)
            {
                throw new ArgumentNullException(nameof(resources));
            }

            if (languages == null)
            {
                throw new ArgumentNullException(nameof(languages));
            }

            _popupTitleLength  = popupTitleLength;
            _listDisplayLength = listDisplayLength;
            Resources          = resources.Select(r => ConvertToApiModel(r, languages)).ToList();
            Languages          = languages.Select(l => new CultureApiModel(l.Name, l.EnglishName));
            Options            = new UiOptions();
        }
Пример #3
0
 public BaseApiModel(IEnumerable <CultureInfo> languages)
 {
     Options   = new UiOptions();
     Languages = languages.Select(l => new CultureApiModel(l.Name, l.EnglishName));
 }