1 write to Parts
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
MEF\TestComposition.cs (1)
79
Parts
= parts;
18 references to Parts
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);
143
=> WithParts(
Parts
.Union(types ?? Array.Empty<Type>()));
155
=> RemoveAssemblies(composition.Assemblies).RemoveParts(composition.
Parts
).RemoveExcludedPartTypes(composition.ExcludedPartTypes);
164
=> WithParts(
Parts
.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 (8)
TestCompositionTests.cs (8)
48
AssertEx.SetEqual(new[] { type1 }, composition2.
Parts
);
49
Assert.Empty(composition3.
Parts
);
53
AssertEx.SetEqual(new[] { type2 }, composition4.
Parts
);
68
Assert.Empty(composition3.
Parts
);
71
Assert.Empty(composition3.
Parts
);
75
Assert.Empty(composition4.
Parts
);
93
AssertEx.SetEqual(new[] { type1, type2 }, composition3.
Parts
);
99
AssertEx.SetEqual(new[] { type2 }, composition4.
Parts
);