1 write to Parts
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
MEF\TestComposition.cs (1)
79Parts = 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. 99var 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>())); 185return 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)
48AssertEx.SetEqual(new[] { type1 }, composition2.Parts); 49Assert.Empty(composition3.Parts); 53AssertEx.SetEqual(new[] { type2 }, composition4.Parts); 68Assert.Empty(composition3.Parts); 71Assert.Empty(composition3.Parts); 75Assert.Empty(composition4.Parts); 93AssertEx.SetEqual(new[] { type1, type2 }, composition3.Parts); 99AssertEx.SetEqual(new[] { type2 }, composition4.Parts);