コード例 #1
0
        } // LogosPackage

        public static UiContentProviderIdentification FromXmlConfiguration(Identification identification, IEnumerable <string> uiCultures)
        {
            if (identification == null)
            {
                throw new ArgumentNullException();
            }
            if (uiCultures == null)
            {
                throw new ArgumentNullException();
            }

            var result = new UiContentProviderIdentification();

            // id
            result.Id = identification.Id;

            // identification
            var matching  = LocalizedObject.FindMatchingCultureObject(identification.Localized, uiCultures);
            var localized = (matching != null) ? matching : identification.Localized[0];

            result.DisplayName        = localized.Name;
            result.DisplayDescription = localized.Description;

            // packages names
            result.LogosPackage = identification.LogosPackageName;

            return(result);
        } // FromXmlConfiguration
コード例 #2
0
        } // Bootstrap

        public static UiContentProvider FromXmlConfiguration(IpTvProviderData contentProvider, IEnumerable <string> uiCultures)
        {
            if (contentProvider == null)
            {
                throw new ArgumentNullException();
            }
            if (uiCultures == null)
            {
                throw new ArgumentNullException();
            }

            var result = new UiContentProvider();

            result.Identification = UiContentProviderIdentification.FromXmlConfiguration(contentProvider.Identification, uiCultures);
            result.FriendlyNames  = UiContentProviderFriendlyNames.FromXmlConfiguration(contentProvider.FriendlyNames, uiCultures);
            result.Bootstrap      = contentProvider.Bootstrap;

            return(result);
        } // FromXmlConfiguration