Removing unused Resources from System.Threading.Overlapped (#39395)
authorJose Perez Rodriguez <joperezr@microsoft.com>
Thu, 16 Jul 2020 23:10:57 +0000 (16:10 -0700)
committerGitHub <noreply@github.com>
Thu, 16 Jul 2020 23:10:57 +0000 (16:10 -0700)
* Removing unused Resources from System.Threading.Overlapped

* Removing unused code from S.T.O.csproj and add Resources check to test

src/libraries/System.Runtime/tests/System/NullableMetadataTests.cs
src/libraries/System.Threading.Overlapped/src/Resources/Strings.resx [deleted file]
src/libraries/System.Threading.Overlapped/src/System.Threading.Overlapped.csproj

index 355d54f..d2f7856 100644 (file)
@@ -128,12 +128,15 @@ namespace System.Runtime.Tests
             Assert.True(foundAtLeastOneNullableAttribute);
         }
 
-        [Fact]
-        public static void ShimsHaveOnlyTypeForwards()
+        [Theory]
+        [InlineData("mscorlib")]
+        [InlineData("System.Threading.Overlapped")]
+        public static void ShimsHaveOnlyTypeForwards(string assemblyName)
         {
-            Assembly assembly = Assembly.Load("mscorlib");
+            Assembly assembly = Assembly.Load(assemblyName);
 
             Assert.Empty(assembly.GetTypes());
+            Assert.Empty(assembly.GetManifestResourceNames());
             Assert.NotEmpty(assembly.GetForwardedTypes());
         }
 
diff --git a/src/libraries/System.Threading.Overlapped/src/Resources/Strings.resx b/src/libraries/System.Threading.Overlapped/src/Resources/Strings.resx
deleted file mode 100644 (file)
index c7bbd18..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-<root>
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
-    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
-    <xsd:element name="root" msdata:IsDataSet="true">
-      <xsd:complexType>
-        <xsd:choice maxOccurs="unbounded">
-          <xsd:element name="metadata">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
-              </xsd:sequence>
-              <xsd:attribute name="name" use="required" type="xsd:string" />
-              <xsd:attribute name="type" type="xsd:string" />
-              <xsd:attribute name="mimetype" type="xsd:string" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="assembly">
-            <xsd:complexType>
-              <xsd:attribute name="alias" type="xsd:string" />
-              <xsd:attribute name="name" type="xsd:string" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="data">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="resheader">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" />
-            </xsd:complexType>
-          </xsd:element>
-        </xsd:choice>
-      </xsd:complexType>
-    </xsd:element>
-  </xsd:schema>
-  <resheader name="resmimetype">
-    <value>text/microsoft-resx</value>
-  </resheader>
-  <resheader name="version">
-    <value>2.0</value>
-  </resheader>
-  <resheader name="reader">
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <resheader name="writer">
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <data name="Argument_AlreadyBoundOrSyncHandle" xml:space="preserve">
-    <value>'handle' has already been bound to the thread pool, or was not opened for asynchronous I/O.</value>
-  </data>
-  <data name="Argument_InvalidHandle" xml:space="preserve">
-    <value>Handle has been disposed or is invalid.</value>
-  </data>
-  <data name="Argument_NativeOverlappedAlreadyFree" xml:space="preserve">
-    <value>'overlapped' has already been freed.</value>
-  </data>
-  <data name="Argument_NativeOverlappedWrongBoundHandle" xml:space="preserve">
-    <value>'overlapped' was not allocated by this ThreadPoolBoundHandle instance.</value>
-  </data>
-  <data name="Argument_PreAllocatedAlreadyAllocated" xml:space="preserve">
-    <value>'preAllocated' is already in use.</value>
-  </data>
-  <data name="InvalidOperation_NativeOverlappedReused" xml:space="preserve">
-    <value>NativeOverlapped cannot be reused for multiple operations.</value>
-  </data>
-</root>
index a5c9c0d..dd3dc29 100644 (file)
@@ -1,7 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <AssemblyName>System.Threading.Overlapped</AssemblyName>
-    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
     <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
     <Nullable>enable</Nullable>