1 write to ExcludedPartTypes
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
MEF\TestComposition.cs (1)
80
ExcludedPartTypes
= excludedPartTypes;
17 references to ExcludedPartTypes
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (10)
MEF\TestComposition.cs (10)
65
/// All subtypes of types specified in <see cref="
ExcludedPartTypes
"/> and defined in <see cref="Assemblies"/> are excluded before <see cref="Parts"/> are added.
99
var key = new CacheKey(Assemblies, Parts,
ExcludedPartTypes
);
128
=> ExportProviderCache.CreateAssemblyCatalog(Assemblies, ExportProviderCache.CreateResolver()).WithoutPartsOfTypes(
ExcludedPartTypes
).WithParts(Parts);
134
=> AddAssemblies(composition.Assemblies).AddParts(composition.Parts).AddExcludedPartTypes(composition.
ExcludedPartTypes
);
149
=> WithExcludedPartTypes(
ExcludedPartTypes
.Union(types ?? Array.Empty<Type>()));
155
=> RemoveAssemblies(composition.Assemblies).RemoveParts(composition.Parts).RemoveExcludedPartTypes(composition.
ExcludedPartTypes
);
170
=> WithExcludedPartTypes(
ExcludedPartTypes
.Except(types ?? Array.Empty<Type>()));
185
return new TestComposition(assemblies, Parts,
ExcludedPartTypes
);
198
=> (parts == Parts) ? this : new TestComposition(Assemblies, parts,
ExcludedPartTypes
);
201
=> (excludedPartTypes ==
ExcludedPartTypes
) ? this : new TestComposition(Assemblies, Parts, excludedPartTypes);
Microsoft.CodeAnalysis.Workspaces.UnitTests (7)
TestCompositionTests.cs (7)
50
Assert.Empty(composition3.
ExcludedPartTypes
);
54
Assert.Empty(composition3.
ExcludedPartTypes
);
67
AssertEx.SetEqual(new[] { type1 }, composition2.
ExcludedPartTypes
);
70
Assert.Empty(composition3.
ExcludedPartTypes
);
74
AssertEx.SetEqual(new[] { type2 }, composition4.
ExcludedPartTypes
);
94
AssertEx.SetEqual(new[] { excluded1, excluded2 }, composition3.
ExcludedPartTypes
);
100
AssertEx.SetEqual(new[] { excluded2 }, composition4.
ExcludedPartTypes
);