/
githubmirror
/
roslyn
Обзор
Документация
Войти
/
githubmirror
/
roslyn
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Compilers/Test/Core/Traits/CompilerTraitDiscoverer.cs
29 строк
918 B
Tomas Matousek
Move
23 окт 2020, 21:06
23 окт 2020, 21:06
d49cd2b
Код
Авторство
О чём код?
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. #nullable disable using Roslyn.Utilities; using System; using System.Collections.Generic; using System.Linq; using Xunit; using Xunit.Abstractions; using Xunit.Sdk; namespace Microsoft.CodeAnalysis.Test.Utilities { public sealed class CompilerTraitDiscoverer : ITraitDiscoverer { public IEnumerable<KeyValuePair<string, string>> GetTraits(IAttributeInfo traitAttribute) { var array = (CompilerFeature[])traitAttribute.GetConstructorArguments().Single(); foreach (var feature in array) { var value = feature.ToString(); yield return new KeyValuePair<string, string>("Compiler", value); } } } }