提交 ef3b5549 编写于 作者: A Andrew Casey

Replace loop with SelectMany call

上级 77623faa
......@@ -357,13 +357,7 @@ where IsDiagnosticAnalyzerAttribute(peModule, customAttrHandle)
where attributeSupportedLanguages != null
select attributeSupportedLanguages;
IEnumerable<string> supportedLanguages = SpecializedCollections.EmptyEnumerable<string>();
foreach (IEnumerable<string> languages in attributeLanguagesList)
{
supportedLanguages = supportedLanguages.Concat(languages);
}
return supportedLanguages;
return attributeLanguagesList.SelectMany(x => x);
}
private static IEnumerable<string> GetSupportedLanguages(PEModule peModule, CustomAttributeHandle customAttrHandle)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册