Cleanup System.ComponentModel.Composition
authorViktor Hofer <viktor.hofer@outlook.com>
Thu, 26 Apr 2018 16:33:27 +0000 (18:33 +0200)
committerViktor Hofer <viktor.hofer@microsoft.com>
Mon, 2 Jul 2018 19:42:37 +0000 (21:42 +0200)
Fix failing tests & remove noisy output loggings

Use common threadculture and remove unused files

Cleanup test codebase & delete unused files

Remove resource from turd assembly

Auto format documents

Commit migrated from https://github.com/dotnet/corefx/commit/78bf9d7974d9413eed39ebc4d7b220ce3ed70d92

30 files changed:
src/libraries/System.ComponentModel.Composition/src/System.ComponentModel.Composition.csproj
src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/AttributedModel/AttributedPartCreationInfo.cs
src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/CompositionResultOfT.cs
src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Diagnostics/CompositionTrace.cs
src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Diagnostics/CompositionTraceId.cs
src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Diagnostics/DebuggerTraceWriter.cs [moved from src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Diagnostics/SilverlightTraceWriter.cs with 100% similarity]
src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ExceptionBuilder.cs
src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/AdaptationConstants.cs [deleted file]
src/libraries/System.ComponentModel.Composition/tests/CacheTestsMetadataViews.cs [deleted file]
src/libraries/System.ComponentModel.Composition/tests/ICollectionOfStrings.cs [deleted file]
src/libraries/System.ComponentModel.Composition/tests/IExportableTest.cs [deleted file]
src/libraries/System.ComponentModel.Composition/tests/IMetadataView.cs
src/libraries/System.ComponentModel.Composition/tests/ISimpleMetadataView.cs [deleted file]
src/libraries/System.ComponentModel.Composition/tests/MetadataTests_IMetadataView.cs
src/libraries/System.ComponentModel.Composition/tests/StringsTests.cs [deleted file]
src/libraries/System.ComponentModel.Composition/tests/System.ComponentModel.Composition.Tests.csproj
src/libraries/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/AdvancedValueComposition.cs
src/libraries/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/AttributedModelServicesTests.cs
src/libraries/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/CompositionExceptionTests.cs
src/libraries/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/Diagnostics/CompositionTraceIdTests.cs [deleted file]
src/libraries/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/Diagnostics/TraceEventDetails.cs [deleted file]
src/libraries/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/Diagnostics/TraceId.cs [deleted file]
src/libraries/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/Extensibility/CustomImportManyAttribute.cs
src/libraries/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/Hosting/AssemblyCatalogTests.cs
src/libraries/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/MetadataViewProviderTests.cs
src/libraries/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/ScopedCompositionServicetests.cs
src/libraries/System.ComponentModel.Composition/tests/System/Globalization/CurrentCultureContext.cs [deleted file]
src/libraries/System.ComponentModel.Composition/tests/System/LazyHelper.cs [moved from src/libraries/System.ComponentModel.Composition/tests/Microsoft/Internal/LazyServices.cs with 83% similarity]
src/libraries/System.ComponentModel.Composition/tests/TestAssembly.cs [deleted file]
src/libraries/System.ComponentModel.Composition/tests/TransparentTestCase.cs [deleted file]

index cc46062..65ee8ce 100644 (file)
@@ -85,7 +85,7 @@
     <Compile Include="System\ComponentModel\Composition\Diagnostics\CompositionTrace.cs" />
     <Compile Include="System\ComponentModel\Composition\Diagnostics\CompositionTraceId.cs" />
     <Compile Include="System\ComponentModel\Composition\Diagnostics\CompositionTraceSource.cs" />
-    <Compile Include="System\ComponentModel\Composition\Diagnostics\SilverlightTraceWriter.cs" />
+    <Compile Include="System\ComponentModel\Composition\Diagnostics\DebuggerTraceWriter.cs" />
     <Compile Include="System\ComponentModel\Composition\Diagnostics\TraceWriter.cs" />
     <Compile Include="System\ComponentModel\Composition\Hosting\AggregateCatalog.cs" />
     <Compile Include="System\ComponentModel\Composition\Hosting\AggregateExportProvider.cs" />
       <Link>Microsoft\Internal\Requires.cs</Link>
     </Compile>
   </ItemGroup>
-  <ItemGroup>
+  <ItemGroup Condition="'$(TargetGroup)' != 'netstandard'">
     <EmbeddedResource Include="$(CommonPath)\Microsoft\Internal\CommonStrings.resx">
       <Link>Microsoft\Internal\CommonStrings.resx</Link>
       <Generator>ResXFileCodeGenerator</Generator>
index c93d6a1..4928236 100644 (file)
@@ -28,7 +28,7 @@ namespace System.ComponentModel.Composition.AttributedModel
         public AttributedPartCreationInfo(Type type, PartCreationPolicyAttribute partCreationPolicy, bool ignoreConstructorImports, ICompositionElement origin)
         {
             Assumes.NotNull(type);
-            
+
             _type = type;
             _ignoreConstructorImports = ignoreConstructorImports;
             _partCreationPolicy = partCreationPolicy;
@@ -152,7 +152,7 @@ namespace System.ComponentModel.Composition.AttributedModel
             return isArityMatched;
         }
 
-string ICompositionElement.DisplayName
+        string ICompositionElement.DisplayName
         {
             get { return GetDisplayName(); }
         }
@@ -268,7 +268,7 @@ string ICompositionElement.DisplayName
             {
                 foreach (ExportAttribute exportAttribute in member.GetAttributes<ExportAttribute>())
                 {
-                    var attributedExportDefinition = CreateExportDefinition(member, exportAttribute);
+                    AttributedExportDefinition attributedExportDefinition = CreateExportDefinition(member, exportAttribute);
 
                     if (exportAttribute.GetType() == CompositionServices.InheritedExportAttributeType)
                     {
@@ -297,7 +297,7 @@ string ICompositionElement.DisplayName
             {
                 foreach (InheritedExportAttribute exportAttribute in type.GetAttributes<InheritedExportAttribute>())
                 {
-                    var attributedExportDefinition = CreateExportDefinition(type, exportAttribute);
+                    AttributedExportDefinition attributedExportDefinition = CreateExportDefinition(type, exportAttribute);
 
                     if (!_contractNamesOnNonInterfaces.Contains(attributedExportDefinition.ContractName))
                     {
@@ -341,7 +341,7 @@ string ICompositionElement.DisplayName
             }
 
             // Walk the fields 
-            foreach (var member in type.GetFields(flags))
+            foreach (FieldInfo member in type.GetFields(flags))
             {
                 if (IsExport(member))
                 {
@@ -350,7 +350,7 @@ string ICompositionElement.DisplayName
             }
 
             // Walk the properties 
-            foreach (var member in type.GetProperties(flags))
+            foreach (PropertyInfo member in type.GetProperties(flags))
             {
                 if (IsExport(member))
                 {
@@ -359,7 +359,7 @@ string ICompositionElement.DisplayName
             }
 
             // Walk the methods 
-            foreach (var member in type.GetMethods(flags))
+            foreach (MethodInfo member in type.GetMethods(flags))
             {
                 if (IsExport(member))
                 {
@@ -388,7 +388,7 @@ string ICompositionElement.DisplayName
             {
                 yield break;
             }
-            
+
             // Stopping at object instead of null to help with performance. It is a noticable performance
             // gain (~5%) if we don't have to try and pull the attributes we know don't exist on object.
             // We also need the null check in case we're passed a type that doesn't live in the runtime context.
@@ -430,7 +430,7 @@ string ICompositionElement.DisplayName
                 imports.Add(importDefinition);
             }
 
-            var constructor = GetConstructor();
+            ConstructorInfo constructor = GetConstructor();
 
             if (constructor != null)
             {
@@ -480,7 +480,7 @@ string ICompositionElement.DisplayName
             BindingFlags flags = BindingFlags.DeclaredOnly | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance;
 
             // Walk the fields 
-            foreach (var member in type.GetFields(flags))
+            foreach (FieldInfo member in type.GetFields(flags))
             {
                 if (IsImport(member))
                 {
@@ -489,7 +489,7 @@ string ICompositionElement.DisplayName
             }
 
             // Walk the properties 
-            foreach (var member in type.GetProperties(flags))
+            foreach (PropertyInfo member in type.GetProperties(flags))
             {
                 if (IsImport(member))
                 {
index ee1de88..7a9ece6 100644 (file)
@@ -12,19 +12,19 @@ namespace System.ComponentModel.Composition
     {
         private readonly IEnumerable<CompositionError> _errors;
         private readonly T _value;
-        
+
         public CompositionResult(T value)
-            : this(value, (CompositionError[])null)
+            : this(value, null)
         {
         }
 
         public CompositionResult(params CompositionError[] errors)
-            : this(default(T), (IEnumerable<CompositionError>)errors)
+            : this(defaulterrors)
         {
         }
 
         public CompositionResult(IEnumerable<CompositionError> errors)
-            : this(default(T), errors)
+            : this(default, errors)
         {
         }
 
@@ -49,11 +49,11 @@ namespace System.ComponentModel.Composition
         /// </summary>
         public T Value
         {
-            get 
+            get
             {
                 ThrowOnErrors();
 
-                return _value; 
+                return _value;
             }
         }
 
index e387f85..e34cc73 100644 (file)
@@ -18,9 +18,9 @@ namespace System.ComponentModel.Composition.Diagnostics
 
             if (CompositionTraceSource.CanWriteInformation)
             {
-                CompositionTraceSource.WriteInformation(CompositionTraceId.Rejection_DefinitionResurrected, 
-                                                        SR.CompositionTrace_Rejection_DefinitionResurrected, 
-                                                        definition.GetDisplayName());
+                CompositionTraceSource.WriteInformation(CompositionTraceId.Rejection_DefinitionResurrected,
+                    SR.CompositionTrace_Rejection_DefinitionResurrected,
+                    definition.GetDisplayName());
             }
         }
 
@@ -30,25 +30,25 @@ namespace System.ComponentModel.Composition.Diagnostics
 
             if (CompositionTraceSource.CanWriteWarning)
             {
-                CompositionTraceSource.WriteWarning(CompositionTraceId.Rejection_DefinitionRejected, 
-                                                    SR.CompositionTrace_Rejection_DefinitionRejected, 
-                                                    definition.GetDisplayName(), 
-                                                    exception.Message);
+                CompositionTraceSource.WriteWarning(CompositionTraceId.Rejection_DefinitionRejected,
+                    SR.CompositionTrace_Rejection_DefinitionRejected,
+                    definition.GetDisplayName(),
+                    exception.Message);
             }
         }
 
         internal static void AssemblyLoadFailed(DirectoryCatalog catalog, string fileName, Exception exception)
         {
             Assumes.NotNull(catalog, exception);
-            Assumes.NotNullOrEmpty(fileName);            
+            Assumes.NotNullOrEmpty(fileName);
 
             if (CompositionTraceSource.CanWriteWarning)
             {
-                CompositionTraceSource.WriteWarning(CompositionTraceId.Discovery_AssemblyLoadFailed, 
-                                                    SR.CompositionTrace_Discovery_AssemblyLoadFailed, 
-                                                    catalog.GetDisplayName(),
-                                                    fileName, 
-                                                    exception.Message);
+                CompositionTraceSource.WriteWarning(CompositionTraceId.Discovery_AssemblyLoadFailed,
+                    SR.CompositionTrace_Discovery_AssemblyLoadFailed,
+                    catalog.GetDisplayName(),
+                    fileName,
+                    exception.Message);
             }
         }
 
@@ -58,9 +58,9 @@ namespace System.ComponentModel.Composition.Diagnostics
 
             if (CompositionTraceSource.CanWriteInformation)
             {
-                CompositionTraceSource.WriteInformation(CompositionTraceId.Discovery_DefinitionMarkedWithPartNotDiscoverableAttribute, 
-                                                        SR.CompositionTrace_Discovery_DefinitionMarkedWithPartNotDiscoverableAttribute, 
-                                                        type.GetDisplayName());
+                CompositionTraceSource.WriteInformation(CompositionTraceId.Discovery_DefinitionMarkedWithPartNotDiscoverableAttribute,
+                    SR.CompositionTrace_Discovery_DefinitionMarkedWithPartNotDiscoverableAttribute,
+                    type.GetDisplayName());
             }
         }
 
@@ -72,8 +72,8 @@ namespace System.ComponentModel.Composition.Diagnostics
             if (CompositionTraceSource.CanWriteInformation)
             {
                 CompositionTraceSource.WriteInformation(CompositionTraceId.Discovery_DefinitionMismatchedExportArity,
-                                                        SR.CompositionTrace_Discovery_DefinitionMismatchedExportArity,
-                                                        type.GetDisplayName(), member.GetDisplayName());
+                    SR.CompositionTrace_Discovery_DefinitionMismatchedExportArity,
+                    type.GetDisplayName(), member.GetDisplayName());
             }
         }
 
@@ -84,8 +84,8 @@ namespace System.ComponentModel.Composition.Diagnostics
             if (CompositionTraceSource.CanWriteInformation)
             {
                 CompositionTraceSource.WriteInformation(CompositionTraceId.Discovery_DefinitionContainsNoExports,
-                                                        SR.CompositionTrace_Discovery_DefinitionContainsNoExports,
-                                                        type.GetDisplayName());
+                    SR.CompositionTrace_Discovery_DefinitionContainsNoExports,
+                    type.GetDisplayName());
             }
         }
 
@@ -96,8 +96,8 @@ namespace System.ComponentModel.Composition.Diagnostics
             if (CompositionTraceSource.CanWriteError)
             {
                 CompositionTraceSource.WriteError(CompositionTraceId.Discovery_MemberMarkedWithMultipleImportAndImportMany,
-                                                  SR.CompositionTrace_Discovery_MemberMarkedWithMultipleImportAndImportMany,
-                                                  item.GetDisplayName());
+                    SR.CompositionTrace_Discovery_MemberMarkedWithMultipleImportAndImportMany,
+                    item.GetDisplayName());
             }
         }
     }
index 4ca7b72..76b3a0d 100644 (file)
@@ -14,6 +14,8 @@ namespace System.ComponentModel.Composition.Diagnostics
         Rejection_DefinitionRejected = 1,
         Rejection_DefinitionResurrected = 2,
 
+        // Discovery
+
         Discovery_AssemblyLoadFailed = 3,
         Discovery_DefinitionMarkedWithPartNotDiscoverableAttribute = 4,
         Discovery_DefinitionMismatchedExportArity = 5,
index 73a1ae4..b0f0024 100644 (file)
@@ -9,7 +9,7 @@ using Microsoft.Internal;
 
 namespace System.ComponentModel
 {
-    internal static class ExceptionBuilder // UNDONE combine with other one
+    internal static class ExceptionBuilder
     {
         public static Exception CreateDiscoveryException(string messageFormat, params string[] arguments)
         {
diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/AdaptationConstants.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/AdaptationConstants.cs
deleted file mode 100644 (file)
index a255e0b..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel.Composition.Primitives;
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.Linq;
-using Microsoft.Internal;
-using Microsoft.Internal.Collections;
-using System.Threading;
-
-namespace System.ComponentModel.Composition
-{
-    public static class AdaptationConstants
-    {
-        private const string CompositionNamespace = "System.ComponentModel.Composition";
-
-        public const string AdapterContractName = CompositionNamespace + ".AdapterContract";
-        public const string AdapterFromContractMetadataName = "FromContract";
-        public const string AdapterToContractMetadataName = "ToContract";
-
-    }
-}
diff --git a/src/libraries/System.ComponentModel.Composition/tests/CacheTestsMetadataViews.cs b/src/libraries/System.ComponentModel.Composition/tests/CacheTestsMetadataViews.cs
deleted file mode 100644 (file)
index e28c788..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System.Collections.Generic;
-
-namespace System.ComponentModel.Composition
-{
-    public interface ITrans_CacheTests_SimpleMetadataView
-    {
-        string String { get; }
-        int Int { get; }
-        float Float { get; }
-        Type Type { get; }
-        object Object { get; }
-        IEnumerable<string> Collection { get; }
-    }
-}
diff --git a/src/libraries/System.ComponentModel.Composition/tests/ICollectionOfStrings.cs b/src/libraries/System.ComponentModel.Composition/tests/ICollectionOfStrings.cs
deleted file mode 100644 (file)
index 5b01950..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System.Collections.Generic;
-
-namespace System.ComponentModel.Composition
-{
-    public interface ITrans_CollectionOfStrings
-    {
-        IEnumerable<string> Values { get; }
-    }
-}
diff --git a/src/libraries/System.ComponentModel.Composition/tests/IExportableTest.cs b/src/libraries/System.ComponentModel.Composition/tests/IExportableTest.cs
deleted file mode 100644 (file)
index 8d67b18..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-namespace System.ComponentModel.Composition
-{
-    public interface ITrans_ExportableTest
-    {
-        string Var1 { get; }
-    }
-}
index 16adb81..95e65d5 100644 (file)
@@ -4,14 +4,6 @@
 
 namespace System.ComponentModel.Composition
 {
-    public interface ITrans_MetadataView
-    {
-        string Foo { get; }
-
-        [System.ComponentModel.DefaultValue(null)]
-        string OptionalFoo { get; }
-    }
-
     public interface ITrans_MetadataViewWithDefaultedInt64
     {
         [DefaultValue(long.MaxValue)]
@@ -42,11 +34,6 @@ namespace System.ComponentModel.Composition
         string MyString { get; }
     }
 
-    public interface ITrans_MetadataViewUnboxAsInt
-    {
-        int Value { get; }
-    }
-
     public interface ITrans_HasInt64
     {
         int Value { get; }
diff --git a/src/libraries/System.ComponentModel.Composition/tests/ISimpleMetadataView.cs b/src/libraries/System.ComponentModel.Composition/tests/ISimpleMetadataView.cs
deleted file mode 100644 (file)
index a4a5dcd..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-namespace System.ComponentModel.Composition
-{
-
-    public interface ITrans_SimpleMetadataView
-    {
-        string String { get; }
-        int Int { get; }
-        float Float { get; }
-        Type Type { get; }
-        object Object { get; }
-    }
-}
index cc96ccd..ff1212a 100644 (file)
@@ -4,11 +4,6 @@
 
 namespace System.ComponentModel.Composition
 {
-    public interface ITrans_RecompositionTest_RelationshipView
-    {
-        string Relationship { get; }
-    }
-
     public interface ITrans_StronglyTypedStructure
     {
         string String1 { get; }
diff --git a/src/libraries/System.ComponentModel.Composition/tests/StringsTests.cs b/src/libraries/System.ComponentModel.Composition/tests/StringsTests.cs
deleted file mode 100644 (file)
index b2af800..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System.Linq;
-using System.Reflection;
-using Microsoft.VisualBasic;
-using Xunit;
-
-namespace System
-{
-    public class StringsTests
-    {
-        [Fact]
-        [ActiveIssue(25498)]
-        public void PropertiesAreInsyncWithResources()
-        {
-            var properties = GetStringProperties();
-
-            Assert.True(properties.Length > 0, "Expected to find at least one string property in Strings.cs.");
-
-            Assert.All(properties, property =>
-            {
-                object value = property.GetValue(null, (object[])null);
-                Assert.NotNull(value);
-            });
-        }
-
-        private static PropertyInfo[] GetStringProperties()
-        {
-            PropertyInfo[] properties = typeof(Strings).GetProperties(BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Static);
-
-            return properties.Where(property => 
-            {
-                return !CanIgnore(property);
-
-            }).ToArray();
-        }
-
-        private static bool CanIgnore(PropertyInfo property)
-        {
-            switch (property.Name)
-            {
-                case "Culture":
-                case "ResourceManager":
-                    return true;
-            }
-
-            return false;
-        }
-    }
-}
index 4fa3445..dfc7b44 100644 (file)
     <Compile Include="$(CommonTestPath)\System\IO\TempFile.cs">
       <Link>Common\System\IO\TempFile.cs</Link>
     </Compile>
-    <Compile Include="CacheTestsMetadataViews.cs" />
-    <Compile Include="ICollectionOfStrings.cs" />
-    <Compile Include="IExportableTest.cs" />
     <Compile Include="IMetadataView.cs" />
-    <Compile Include="ISimpleMetadataView.cs" />
     <Compile Include="MetadataTests_IMetadataView.cs" />
-    <Compile Include="Microsoft\Internal\LazyServices.cs" />
-    <Compile Include="StringsTests.cs" />
+    <Compile Include="System\LazyHelper.cs" />
     <Compile Include="System\ComponentModel\Composition\AdvancedValueComposition.cs" />
     <Compile Include="System\ComponentModel\Composition\AggregateExportProviderTest.cs" />
     <Compile Include="System\ComponentModel\Composition\AttributedModelServicesTests.cs" />
@@ -67,9 +62,6 @@
     <Compile Include="System\ComponentModel\Composition\ConstraintServicesTests.cs" />
     <Compile Include="System\ComponentModel\Composition\ContractBasedImportDefinitionTests.cs" />
     <Compile Include="System\ComponentModel\Composition\ContractMismatchExceptionTests.cs" />
-    <Compile Include="System\ComponentModel\Composition\Diagnostics\CompositionTraceIdTests.cs" />
-    <Compile Include="System\ComponentModel\Composition\Diagnostics\TraceEventDetails.cs" />
-    <Compile Include="System\ComponentModel\Composition\Diagnostics\TraceId.cs" />
     <Compile Include="System\ComponentModel\Composition\DynamicMetadata.cs" />
     <Compile Include="System\ComponentModel\Composition\Expectations.cs" />
     <Compile Include="System\ComponentModel\Composition\ExportableAttributeTests.cs" />
     <Compile Include="System\ComponentModel\Composition\ScopedCompositionServicetests.cs" />
     <Compile Include="System\ComponentModel\Composition\ScopeExportFactoryTests.cs" />
     <Compile Include="System\ComponentModel\Composition\ScopingHelpers.cs" />
-    <Compile Include="System\Globalization\CurrentCultureContext.cs" />
     <Compile Include="System\Integration\AdaptingCollectionTests.cs" />
     <Compile Include="System\Integration\CatalogFilteringTests.cs" />
     <Compile Include="System\Integration\CompositionContainerAttributedModelCycleTests.cs" />
     <Compile Include="System\UnitTesting\ExtendedAssert.cs" />
     <Compile Include="System\UnitTesting\RetryMode.cs" />
     <Compile Include="System\UnitTesting\TestServices.cs" />
-    <Compile Include="TestAssembly.cs" />
-    <Compile Include="TransparentTestCase.cs" />
+    <Compile Include="$(CommonTestPath)\System\ThreadCultureChange.cs">
+      <Link>Common\System\ThreadCultureChange.cs</Link>
+    </Compile>
   </ItemGroup>
   <ItemGroup>
     <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
     </ProjectReference>
   </ItemGroup>
   <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
-</Project>
+</Project>
\ No newline at end of file
index a9bd0fd..2608900 100644 (file)
@@ -11,6 +11,16 @@ using Xunit;
 
 namespace System.ComponentModel.Composition
 {
+    public interface ITrans_ExportableTest
+    {
+        string Var1 { get; }
+    }
+
+    public interface ITrans_CollectionOfStrings
+    {
+        IEnumerable<string> Values { get; }
+    }
+
     public class AdvancedValueComposition
     {
         [Fact]
index 3f13e95..0355f4e 100644 (file)
@@ -54,23 +54,13 @@ namespace System.ComponentModel.Composition.AttributedModel
         }
 
         [Fact]
-        [ActiveIssue(25498, TestPlatforms.AnyUnix)] // System.ArgumentException: ComposablePartDefinition of type 'System.ComponentModel.Composition.AttributedModel.ConcreteCPD' cannot be used in this context. Only part definitions produced by the ReflectionModelServices.CreatePartDefinition are supported.
         public void CreatePart_From_InvalidPartDefiniton_ShouldThrowArgumentException()
         {
             Assert.Throws<ArgumentException>("partDefinition", () =>
             {
-                try
-                {
-                    var partDefinition = new ConcreteCPD();
-                    var instance = new CPDTest();
-                    var part = AttributedModelServices.CreatePart(partDefinition, instance);
-                }
-                catch (Exception e)
-                {
-                    Console.WriteLine(e);
-                    throw;
-                }
-
+                var partDefinition = new ConcreteCPD();
+                var instance = new CPDTest();
+                AttributedModelServices.CreatePart(partDefinition, instance);
             });
         }
 
index 6556d3c..7c1007a 100644 (file)
@@ -3,6 +3,7 @@
 // See the LICENSE file in the project root for more information.
 
 using System.Collections.Generic;
+using System.Common.Tests;
 using System.ComponentModel.Composition.Factories;
 using System.ComponentModel.Composition.Primitives;
 using System.Globalization;
@@ -367,14 +368,15 @@ namespace System.ComponentModel.Composition
         [Fact]
         public void Message_ShouldFormatCountOfRootCausesUsingTheCurrentCulture()
         {
-            var cultures = Expectations.GetCulturesForFormatting();
+            IEnumerable<CultureInfo> cultures = Expectations.GetCulturesForFormatting();
 
-            foreach (var culture in cultures)
+            foreach (CultureInfo culture in cultures)
             {
-                using (new CurrentCultureContext(culture))
+                // Save old culture and set a fixed culture for object instantiation
+                using (new ThreadCultureChange(culture))
                 {
-                    var errors = CreateCompositionErrors(1000);
-                    var exception = CreateCompositionException(errors);
+                    CompositionError[] errors = CreateCompositionErrors(1000);
+                    CompositionException exception = CreateCompositionException(errors);
                     AssertMessage(exception, 1000, culture);
 
                     errors = CreateCompositionErrors(1);
diff --git a/src/libraries/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/Diagnostics/CompositionTraceIdTests.cs b/src/libraries/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/Diagnostics/CompositionTraceIdTests.cs
deleted file mode 100644 (file)
index 6921c4f..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System.UnitTesting;
-using Xunit;
-
-namespace System.ComponentModel.Composition.Diagnostics
-{
-    public class CompositionTraceIdTests
-    {
-        [Fact]
-        [ActiveIssue(25498, TargetFrameworkMonikers.UapAot)]
-        public void CompositionTraceIdsAreInSyncWithTraceIds()
-        {
-            ExtendedAssert.EnumsContainSameValues<CompositionTraceId, TraceId>();
-        }
-    }
-}
diff --git a/src/libraries/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/Diagnostics/TraceEventDetails.cs b/src/libraries/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/Diagnostics/TraceEventDetails.cs
deleted file mode 100644 (file)
index 1062667..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System.Diagnostics;
-
-namespace System.ComponentModel.Composition.Diagnostics
-{
-    public class TraceEventDetails
-    {
-        public TraceEventDetails(TraceEventCache eventCache, string source, TraceEventType eventType, TraceId id, string format, params object[] args)
-        {
-            EventCache = eventCache;
-            Source = source;
-            EventType = eventType;
-            Id = id;
-            Format = format;
-            Args = args;
-        }
-
-        public TraceEventCache EventCache
-        {
-            get;
-            private set;
-        }
-
-        public string Source
-        {
-            get;
-            private set;
-        }
-
-        public TraceEventType EventType
-        {
-            get;
-            private set;
-        }
-
-        public TraceId Id
-        {
-            get;
-            private set;
-        }
-
-        public string Format
-        {
-            get;
-            private set;
-        }
-
-        public object[] Args
-        {
-            get;
-            private set;
-        }
-    }
-}
diff --git a/src/libraries/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/Diagnostics/TraceId.cs b/src/libraries/System.ComponentModel.Composition/tests/System/ComponentModel/Composition/Diagnostics/TraceId.cs
deleted file mode 100644 (file)
index 317a15a..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-namespace System.ComponentModel.Composition.Diagnostics
-{
-    // We need a public version of CompositionTraceId, so that the QA tests can access and verify the trace.
-    public enum TraceId : ushort
-    {
-        Rejection_DefinitionRejected = CompositionTraceId.Rejection_DefinitionRejected,
-        Rejection_DefinitionResurrected = CompositionTraceId.Rejection_DefinitionResurrected,
-
-        Discovery_AssemblyLoadFailed = CompositionTraceId.Discovery_AssemblyLoadFailed,
-        Discovery_DefinitionMarkedWithPartNotDiscoverableAttribute = CompositionTraceId.Discovery_DefinitionMarkedWithPartNotDiscoverableAttribute,
-        Discovery_DefinitionMismatchedExportArity = CompositionTraceId.Discovery_DefinitionMismatchedExportArity,
-        Discovery_DefinitionContainsNoExports = CompositionTraceId.Discovery_DefinitionContainsNoExports,
-        Discovery_MemberMarkedWithMultipleImportAndImportMany = CompositionTraceId.Discovery_MemberMarkedWithMultipleImportAndImportMany,
-    }
-}
index bd02b9e..ca91b49 100644 (file)
@@ -10,10 +10,5 @@ namespace System.ComponentModel.Composition.Extensibility
         public CustomImportManyAttribute()
         {
         }
-
-        public CustomImportManyAttribute(Type type)
-            : base(type)
-        {
-        }
     }
 }
index b5e8d4c..2a9ffef 100644 (file)
@@ -27,6 +27,14 @@ namespace System.ComponentModel.Composition
         }
     }
 
+    public class TestAssemblyOne { }
+
+    public class TestAssemblyTwo { }
+
+    public class TestAssemblyThree { }
+
+    public class TestAssemblyFour { }
+
     public class AssemblyCatalogTestsHelper
     {
         protected string GetAttributedAssemblyCodeBase()
index f537283..237ad60 100644 (file)
@@ -8,6 +8,14 @@ using Xunit;
 
 namespace System.ComponentModel.Composition
 {
+    internal static class TransparentTestCase
+    {
+        public static int GetMetadataView_IMetadataViewWithDefaultedIntInTranparentType(ITrans_MetadataViewWithDefaultedInt view)
+        {
+            return view.MyInt;
+        }
+    }
+
     [MetadataViewImplementation(typeof(MetadataViewWithImplementation))]
     public interface IMetadataViewWithImplementation
     {
index 11be899..d33b204 100644 (file)
@@ -13,10 +13,10 @@ namespace System.ComponentModel.Composition
         [Export]
         public class ClassRoot
         {
-            [ImportAttribute] 
+            [ImportAttribute]
             public ExportFactory<ClassA> classA;
 
-            [ImportAttribute] 
+            [ImportAttribute]
             public ClassA localClassA;
         }
 
@@ -38,24 +38,24 @@ namespace System.ComponentModel.Composition
         public class FromRoot
         {
             [Import]
-            public ExportFactory<ClassRequiresICompositionService> Required { get; set; }   
-            
+            public ExportFactory<ClassRequiresICompositionService> Required { get; set; }
+
             [Import]
-            public ExportFactory<ClassOptionallyImportsICompositionService> Optional { get; set; }   
+            public ExportFactory<ClassOptionallyImportsICompositionService> Optional { get; set; }
         }
 
         [Export]
         public class ClassRequiresICompositionService
         {
-            [Import(AllowDefault=false)]
-            public ICompositionService CompositionService { get; set;  }
+            [Import(AllowDefault = false)]
+            public ICompositionService CompositionService { get; set; }
         }
 
         [Export]
         public class ClassOptionallyImportsICompositionService
         {
-            [Import(AllowDefault=true)]
-            public ICompositionService CompositionService { get; set;  }
+            [Import(AllowDefault = true)]
+            public ICompositionService CompositionService { get; set; }
         }
 
         [Fact]
@@ -66,7 +66,7 @@ namespace System.ComponentModel.Composition
 
             Assert.Throws<ImportCardinalityMismatchException>(() =>
             {
-                var service = container.GetExportedValue<ClassRequiresICompositionService>();
+                ClassRequiresICompositionService service = container.GetExportedValue<ClassRequiresICompositionService>();
                 Assert.Null(service.CompositionService);
             });
         }
@@ -74,44 +74,44 @@ namespace System.ComponentModel.Composition
         [Fact]
         public void DontExportICompositionServiceFromRootOptionalImportShouldSucceed()
         {
-            var rootCatalog = new TypeCatalog(typeof(ClassRequiresICompositionService),typeof(ClassOptionallyImportsICompositionService));
+            var rootCatalog = new TypeCatalog(typeof(ClassRequiresICompositionService), typeof(ClassOptionallyImportsICompositionService));
             var container = new CompositionContainer(rootCatalog);
 
-            var  service = container.GetExportedValue<ClassOptionallyImportsICompositionService>();
+            ClassOptionallyImportsICompositionService service = container.GetExportedValue<ClassOptionallyImportsICompositionService>();
             Assert.Null(service.CompositionService);
         }
 
         [Fact]
         public void ExportICompositionServiceFromRootRequiredImportShouldsucceed()
         {
-            var rootCatalog = new TypeCatalog(typeof(ClassRequiresICompositionService),typeof(ClassOptionallyImportsICompositionService));
+            var rootCatalog = new TypeCatalog(typeof(ClassRequiresICompositionService), typeof(ClassOptionallyImportsICompositionService));
             var container = new CompositionContainer(rootCatalog, CompositionOptions.ExportCompositionService);
 
-            var service = container.GetExportedValue<ClassRequiresICompositionService>();
+            ClassRequiresICompositionService service = container.GetExportedValue<ClassRequiresICompositionService>();
             Assert.NotNull(service.CompositionService);
         }
 
         [Fact]
         public void ExportICompositionServiceFromRootOptionalImportShouldSucceed()
         {
-            var rootCatalog = new TypeCatalog(typeof(ClassRequiresICompositionService),typeof(ClassOptionallyImportsICompositionService));
+            var rootCatalog = new TypeCatalog(typeof(ClassRequiresICompositionService), typeof(ClassOptionallyImportsICompositionService));
             var container = new CompositionContainer(rootCatalog, CompositionOptions.ExportCompositionService);
 
-            var service = container.GetExportedValue<ClassOptionallyImportsICompositionService>();
+            ClassOptionallyImportsICompositionService service = container.GetExportedValue<ClassOptionallyImportsICompositionService>();
             Assert.NotNull(service.CompositionService);
         }
 
         [Fact]
         public void DontExportICompositionServiceFromChildImportShouldShouldThrowCompositionException()
         {
-            var rootCatalog = new TypeCatalog( typeof(FromRoot) );
-            var childCatalog = new TypeCatalog( typeof(ClassRequiresICompositionService), typeof(ClassOptionallyImportsICompositionService) );
-            var scope = rootCatalog.AsScope(childCatalog.AsScope());
+            var rootCatalog = new TypeCatalog(typeof(FromRoot));
+            var childCatalog = new TypeCatalog(typeof(ClassRequiresICompositionService), typeof(ClassOptionallyImportsICompositionService));
+            CompositionScopeDefinition scope = rootCatalog.AsScope(childCatalog.AsScope());
             var container = new CompositionContainer(scope);
 
             Assert.Throws<ImportCardinalityMismatchException>(() =>
             {
-                var fromRoot = container.GetExportedValue<FromRoot>();
+                FromRoot fromRoot = container.GetExportedValue<FromRoot>();
                 Assert.Null(fromRoot);
             });
         }
@@ -119,38 +119,37 @@ namespace System.ComponentModel.Composition
         [Fact]
         public void ExportICompositionServiceFromChildImportShouldShouldSucceed()
         {
-            var childCatalog = new TypeCatalog( typeof(ClassRequiresICompositionService), typeof(ClassOptionallyImportsICompositionService) );
-            var rootCatalog = new TypeCatalog( typeof(FromRoot) );
-            var scope = rootCatalog.AsScope(childCatalog.AsScope());
+            var childCatalog = new TypeCatalog(typeof(ClassRequiresICompositionService), typeof(ClassOptionallyImportsICompositionService));
+            var rootCatalog = new TypeCatalog(typeof(FromRoot));
+            CompositionScopeDefinition scope = rootCatalog.AsScope(childCatalog.AsScope());
             var container = new CompositionContainer(scope, CompositionOptions.ExportCompositionService);
 
-            var fromRoot = container.GetExportedValue<FromRoot>();
+            FromRoot fromRoot = container.GetExportedValue<FromRoot>();
 
-            var requiredService = fromRoot.Required.CreateExport();
-            Console.WriteLine("requiredService: {0}", requiredService.Value.CompositionService);
+            ExportLifetimeContext<ClassRequiresICompositionService> requiredService = fromRoot.Required.CreateExport();
             Assert.NotNull(requiredService.Value.CompositionService);
 
-            var optionalService = fromRoot.Optional.CreateExport();
-            Console.WriteLine("optionalService: {0}", optionalService.Value.CompositionService);
+            ExportLifetimeContext<ClassOptionallyImportsICompositionService> optionalService = fromRoot.Optional.CreateExport();
             Assert.NotNull(optionalService.Value.CompositionService);
         }
 
         [Fact]
         public void ScopingEndToEndWithCompositionService_MatchingCatalogsShouldSucceed()
         {
-            var c = new TypeCatalog( typeof(ClassRoot), typeof(ClassA) );
-            var sd = c.AsScope( c.AsScope() );
+            var c = new TypeCatalog(typeof(ClassRoot), typeof(ClassA));
+            CompositionScopeDefinition sd = c.AsScope(c.AsScope());
 
             var container = new CompositionContainer(sd, CompositionOptions.ExportCompositionService);
 
-            var fromRoot = container.GetExportedValue<ClassRoot>();
-            var a1 = fromRoot.classA.CreateExport().Value;
-            var a2 = fromRoot.classA.CreateExport().Value;
+            ClassRoot fromRoot = container.GetExportedValue<ClassRoot>();
+            ClassA a1 = fromRoot.classA.CreateExport().Value;
+            ClassA a2 = fromRoot.classA.CreateExport().Value;
             fromRoot.localClassA.InstanceValue = 101;
             a1.InstanceValue = 202;
             a2.InstanceValue = 303;
 
-            if (a1.InstanceValue ==  a2.InstanceValue) { throw new Exception("Incorrect sharing, a1 is shared with a2"); }
+            if (a1.InstanceValue == a2.InstanceValue)
+            { throw new Exception("Incorrect sharing, a1 is shared with a2"); }
 
             var xroot = new ImportA();
             var x1 = new ImportA();
@@ -159,29 +158,30 @@ namespace System.ComponentModel.Composition
             fromRoot.localClassA.CompositionService.SatisfyImportsOnce(xroot);
             a1.CompositionService.SatisfyImportsOnce(x1);
             a2.CompositionService.SatisfyImportsOnce(x2);
-            Assert.Equal(xroot.classA.InstanceValue, fromRoot.localClassA.InstanceValue); 
-            Assert.Equal(x1.classA.InstanceValue, a1.InstanceValue); 
-            Assert.Equal(x2.classA.InstanceValue, a2.InstanceValue); 
+            Assert.Equal(xroot.classA.InstanceValue, fromRoot.localClassA.InstanceValue);
+            Assert.Equal(x1.classA.InstanceValue, a1.InstanceValue);
+            Assert.Equal(x2.classA.InstanceValue, a2.InstanceValue);
 
         }
 
         [Fact]
         public void ScopingEndToEndWithCompositionService_PartitionedCatalogsShouldSucceed()
         {
-            var c1 = new TypeCatalog( typeof(ClassRoot), typeof(ClassA) );
-            var c2 = new TypeCatalog( typeof(ClassA) );
-            var sd = c1.AsScope( c2.AsScope() );
+            var c1 = new TypeCatalog(typeof(ClassRoot), typeof(ClassA));
+            var c2 = new TypeCatalog(typeof(ClassA));
+            CompositionScopeDefinition sd = c1.AsScope(c2.AsScope());
 
             var container = new CompositionContainer(sd, CompositionOptions.ExportCompositionService);
 
-            var fromRoot = container.GetExportedValue<ClassRoot>();
-            var a1 = fromRoot.classA.CreateExport().Value;
-            var a2 = fromRoot.classA.CreateExport().Value;
+            ClassRoot fromRoot = container.GetExportedValue<ClassRoot>();
+            ClassA a1 = fromRoot.classA.CreateExport().Value;
+            ClassA a2 = fromRoot.classA.CreateExport().Value;
             fromRoot.localClassA.InstanceValue = 101;
             a1.InstanceValue = 202;
             a2.InstanceValue = 303;
 
-            if (a1.InstanceValue ==  a2.InstanceValue) { throw new Exception("Incorrect sharing, a1 is shared with a2"); }
+            if (a1.InstanceValue == a2.InstanceValue)
+            { throw new Exception("Incorrect sharing, a1 is shared with a2"); }
 
             var xroot = new ImportA();
             var x1 = new ImportA();
@@ -190,10 +190,9 @@ namespace System.ComponentModel.Composition
             fromRoot.localClassA.CompositionService.SatisfyImportsOnce(xroot);
             a1.CompositionService.SatisfyImportsOnce(x1);
             a2.CompositionService.SatisfyImportsOnce(x2);
-            Assert.Equal(xroot.classA.InstanceValue, fromRoot.localClassA.InstanceValue); 
-            Assert.Equal(x1.classA.InstanceValue, a1.InstanceValue); 
-            Assert.Equal(x2.classA.InstanceValue, a2.InstanceValue); 
+            Assert.Equal(xroot.classA.InstanceValue, fromRoot.localClassA.InstanceValue);
+            Assert.Equal(x1.classA.InstanceValue, a1.InstanceValue);
+            Assert.Equal(x2.classA.InstanceValue, a2.InstanceValue);
         }
-
     }
 }
diff --git a/src/libraries/System.ComponentModel.Composition/tests/System/Globalization/CurrentCultureContext.cs b/src/libraries/System.ComponentModel.Composition/tests/System/Globalization/CurrentCultureContext.cs
deleted file mode 100644 (file)
index 0ed6e68..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System.Threading;
-
-namespace System.Globalization
-{
-    public class CurrentCultureContext : IDisposable
-    {
-        private CultureInfo _previousCulture;
-
-        public CurrentCultureContext(CultureInfo culture)
-        {
-            _previousCulture = Thread.CurrentThread.CurrentCulture;
-
-            Thread.CurrentThread.CurrentCulture = culture;
-        }
-
-        public void Dispose()
-        {
-            if (_previousCulture != null)
-            {
-                Thread.CurrentThread.CurrentCulture = _previousCulture;
-            }
-        }
-    }
-}
@@ -2,12 +2,11 @@
 // The .NET Foundation licenses this file to you under the MIT license.
 // See the LICENSE file in the project root for more information.
 
-using System;
 using System.Threading;
 
-namespace Microsoft.Internal
+namespace System
 {
-    internal static class LazyServices
+    internal static class LazyHelper
     {
         public static Lazy<T> AsLazy<T>(this T t)
             where T : class
diff --git a/src/libraries/System.ComponentModel.Composition/tests/TestAssembly.cs b/src/libraries/System.ComponentModel.Composition/tests/TestAssembly.cs
deleted file mode 100644 (file)
index 6fe15e6..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System.Reflection;
-
-namespace System.ComponentModel.Composition
-{
-    public class TestAssemblyOne { }
-
-    public class TestAssemblyTwo { }
-
-    public class TestAssemblyThree { }
-
-    public class TestAssemblyFour { }
-
-    [Export]
-    public class TestAssemblyOneExport { }
-    
-    // This is a glorious do nothing ReflectionContext
-    public class ReflectionContextTestAssemblyThreeReflectionContext : ReflectionContext
-    {
-        private ReflectionContextTestAssemblyThreeReflectionContext() {}
-        public override Assembly MapAssembly(Assembly assembly)
-        {
-            return assembly;
-        }
-        
-        public override TypeInfo MapType(TypeInfo type)
-        {
-            return type;
-        }
-   }
-    
-    // This is a glorious do nothing ReflectionContext
-    public class ReflectionContextTestAssemblyOneReflectionContext : ReflectionContext
-    {
-        public override Assembly MapAssembly(Assembly assembly)
-        {
-            return assembly;
-        }
-        
-        public override TypeInfo MapType(TypeInfo type)
-        {
-            return type;
-        }
-    }
-
-    [Export]
-    public class TestAssemblyTwoExport { }
-    
-    public class MyLittleConventionAttribute : CatalogReflectionContextAttribute
-    {
-        public MyLittleConventionAttribute() : base(typeof(ReflectionContextTestAssemblyTwo))
-        {
-        }
-
-        // This is a glorious do nothing ReflectionContext
-        public class ReflectionContextTestAssemblyTwo : ReflectionContext
-        {
-            public override Assembly MapAssembly(Assembly assembly)
-            {
-                return assembly;
-            }
-
-            public override TypeInfo MapType(TypeInfo type)
-            {
-                return type;
-            }
-       }
-    }
-}
diff --git a/src/libraries/System.ComponentModel.Composition/tests/TransparentTestCase.cs b/src/libraries/System.ComponentModel.Composition/tests/TransparentTestCase.cs
deleted file mode 100644 (file)
index 2048348..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-namespace System.ComponentModel.Composition
-{
-    static public class TransparentTestCase
-    {
-        static public int GetMetadataView_IMetadataViewWithDefaultedIntInTranparentType(ITrans_MetadataViewWithDefaultedInt view)
-        {
-            return view.MyInt;
-        }
-    }
-}