File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
src/Packer/Models/Providers Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change 200200 - 在 ` parameter ` 中,有时会出现多于一组参数;这种情况下,每组参数都会自由组合。
201201 - 同样的,` templates ` 也会和每一套参数自由组合。
202202- 将所有组合后的条目汇总,生成语言文件。
203- - 在这一过程中,如果出现了** 键冲突** ,目前而言,** 打包器会在此崩溃!** 不过,如果后续观察表明确实存在此种需要,也会考虑修改这一行为。
204203
205204组合文件可以和其他打包策略混合使用,以修改组合中效果不好的部分,或者添加非组合的内容。
206205
Original file line number Diff line number Diff line change @@ -57,7 +57,8 @@ from template in templates
5757 let formattedKey = string . Format ( template . Key , parameter . Key . ToArray ( ) )
5858 let formattedValue = string . Format ( template . Value , parameter . Value . ToArray ( ) )
5959 select ( formattedKey , formattedValue ) ;
60- return query . ToDictionary ( _ => _ . formattedKey , _ => _ . formattedValue ) ;
60+ var distinct = query . DistinctBy ( _ => _ . formattedKey ) ;
61+ return distinct . ToDictionary ( _ => _ . formattedKey , _ => _ . formattedValue ) ;
6162 }
6263
6364 internal static IEnumerable < KeyValuePair < IEnumerable < TOuter > , IEnumerable < TInner > > >
You can’t perform that action at this time.
0 commit comments