Exemple #1
0
        public static LanguageConfigPartition[] From(IList <IList <LanguageConfigExt> > parts)
        {
            var result = new LanguageConfigPartition[parts.Count];

            for (var i = parts.Count - 1; 0 <= i; i--)
            {
                result[i] = LanguageConfigPartition.From(parts[i]);
            }
            return(result);
        }
Exemple #2
0
        public static LanguageConfigPartition From(IList <LanguageConfigExt> items)
        {
            var partition = new LanguageConfigPartition()
            {
                LanguageConfigs = new LanguageConfig[items.Count]
            };

            for (var i = items.Count - 1; 0 <= i; i--)
            {
                var item = items[i];
                partition.LanguageConfigs[i]         = item.LanguageConfig;
                partition.TotalModelFilenameLengths += item.ModelFilenameLength;
            }
            return(partition);
        }
Exemple #3
0
        public static LanguageConfigPartition[] SplitByPartitionCountOrGreater(this IEnumerable <LanguageConfig> languageConfigs, int partitionCount)
        {
            var parts = LanguageConfigExt.From(languageConfigs).SplitByPartitionCountOrGreater(partitionCount);

            return(LanguageConfigPartition.From(parts));
        }