我也试图寻找XSD文件,但是没有找到。所以我搜索了Visual Studio的dll文件,最终找到了Microsoft.VisualStudio.TestWindow.Core.dll。我使用了dnSpy来查看C#代码,在Microsoft.VisualStudio.TestWindow.Internal.Playlists
命名空间下找到了PropertyRule
类。
所有这些属性名称都是有效的。
PropertyRule.properties = ImmutableArray.Create<ValueTuple<string, TestPropertyType, string>>(new ValueTuple<string, TestPropertyType, string>[]
{
new ValueTuple<string, TestPropertyType, string>("Solution", TestPropertyType.Solution, string.Empty),
new ValueTuple<string, TestPropertyType, string>("Project", TestPropertyType.ProjectName, "TestWindow_ProjectName"),
new ValueTuple<string, TestPropertyType, string>("Namespace", TestPropertyType.NamespaceName, "TestWindow_NamespaceName"),
new ValueTuple<string, TestPropertyType, string>("Class", TestPropertyType.ClassName, "TestWindow_ClassName"),
new ValueTuple<string, TestPropertyType, string>("TargetFramework", TestPropertyType.TargetFramework, "TestWindow_TargetFramework"),
new ValueTuple<string, TestPropertyType, string>("Outcome", TestPropertyType.Outcome, "TestWindow_Outcome"),
new ValueTuple<string, TestPropertyType, string>("Trait", TestPropertyType.Trait, "TestWindow_Traits"),
new ValueTuple<string, TestPropertyType, string>("Test", TestPropertyType.FullyQualifiedName, "TestWindow_FullyQualifiedName"),
new ValueTuple<string, TestPropertyType, string>("TestWithNormalizedFullyQualifiedName", TestPropertyType.NormalizedFullyQualifiedName, "TestWindow_TestGroup"),
new ValueTuple<string, TestPropertyType, string>("DisplayName", TestPropertyType.DisplayName, "TestWindow_DisplayName")
});
查看Match属性的代码
using System;
namespace Microsoft.VisualStudio.TestWindow.Internal.Playlists
{
[Flags]
public enum PropertyRuleMatchFlags
{
Contains = 0,
Not = 1,
Equals = 2,
Subset = 4
}
}
通过查看代码,我能够编辑我的播放列表XML文件以忽略某些项目,这样所有其他项目就可以自动添加了!