[ActiveIssue(25498, TestPlatforms.AnyUnix)] // System.Reflection.ReflectionTypeLoadException : Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. public void TwoTypesWithSameSimpleName() { var catalog = new AssemblyCatalog(typeof(AssemblyCatalogTests).Assembly); var container = new CompositionContainer(catalog); NotSoUniqueName unique1 = container.GetExportedValue <NotSoUniqueName>(); Assert.NotNull(unique1); Assert.Equal(23, unique1.MyIntProperty); NotSoUniqueName2.NotSoUniqueName nestedUnique = container.GetExportedValue <NotSoUniqueName2.NotSoUniqueName>(); Assert.NotNull(nestedUnique); Assert.Equal("MyStringProperty", nestedUnique.MyStringProperty); }
public void TwoTypesWithSameSimpleName() { var catalog = new TypeCatalog(Assembly.GetExecutingAssembly().GetTypes()); var container = new CompositionContainer(catalog); NotSoUniqueName unique1 = container.GetExportedValue <NotSoUniqueName>(); Assert.IsNotNull(unique1); Assert.AreEqual(23, unique1.MyIntProperty); NotSoUniqueName2.NotSoUniqueName nestedUnique = container.GetExportedValue <NotSoUniqueName2.NotSoUniqueName>(); Assert.IsNotNull(nestedUnique); Assert.AreEqual("MyStringProperty", nestedUnique.MyStringProperty); }