Move InvalidAsynchronousStateException down to Primitives in order to break TypeConve...
authorSantiago Fernandez Madero <safern@microsoft.com>
Tue, 18 Sep 2018 22:57:19 +0000 (15:57 -0700)
committerGitHub <noreply@github.com>
Tue, 18 Sep 2018 22:57:19 +0000 (15:57 -0700)
* Move InvalidAsynchronousStateException down to Primitives in order to break TypeConverters dependency

* Depend on TypeConverter for nca2.0 and add netcoreappvnext to packageconfigurations

Commit migrated from https://github.com/dotnet/corefx/commit/2b18c83150b1956dc7a7fe90b743028a9a105d57

src/libraries/Microsoft.Win32.SystemEvents/src/Configurations.props
src/libraries/Microsoft.Win32.SystemEvents/src/Microsoft.Win32.SystemEvents.csproj
src/libraries/System.ComponentModel.Primitives/ref/System.ComponentModel.Primitives.cs
src/libraries/System.ComponentModel.Primitives/src/System.ComponentModel.Primitives.csproj
src/libraries/System.ComponentModel.Primitives/src/System/ComponentModel/InvalidAsynchronousStateException.cs [moved from src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/InvalidAsynchronousStateException.cs with 100% similarity]
src/libraries/System.ComponentModel.TypeConverter/ref/System.ComponentModel.TypeConverter.cs
src/libraries/System.ComponentModel.TypeConverter/src/System.ComponentModel.TypeConverter.csproj

index 3d3730f..22ece15 100644 (file)
@@ -4,11 +4,11 @@
     <PackageConfigurations>
       netstandard;
       netcoreapp2.0-Windows_NT;
+      netcoreapp-Windows_NT;
       net461;
     </PackageConfigurations>
     <BuildConfigurations>
       $(PackageConfigurations);
-      netcoreapp-Windows_NT;
       netfx;
     </BuildConfigurations>
   </PropertyGroup>
index a711229..fa72627 100644 (file)
     <Reference Include="mscorlib" />
     <Reference Include="System" />
   </ItemGroup>
-  <ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp' OR '$(TargetGroup)' == 'netcoreapp2.0'">
+  <ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true'">
     <Reference Include="System.Collections" />
     <Reference Include="System.ComponentModel.EventBasedAsync" />
     <Reference Include="System.ComponentModel.Primitives" />
-    <Reference Include="System.ComponentModel.TypeConverter" />
     <Reference Include="System.Diagnostics.Debug" />
     <Reference Include="System.Diagnostics.Tools" />
     <Reference Include="System.Resources.ResourceManager" />
     <Reference Include="System.Threading" />
     <Reference Include="System.Threading.Thread" />
   </ItemGroup>
+  <ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp2.0'">
+    <Reference Include="System.ComponentModel.TypeConverter" />
+  </ItemGroup>
 </Project>
\ No newline at end of file
index cead28d..2300b24 100644 (file)
@@ -184,6 +184,13 @@ namespace System.ComponentModel
         public InitializationEventAttribute(string eventName) { }
         public string EventName { get; }
     }
+    public partial class InvalidAsynchronousStateException : System.ArgumentException
+    {
+        public InvalidAsynchronousStateException() { }
+        public InvalidAsynchronousStateException(string message) { }
+        public InvalidAsynchronousStateException(string message, System.Exception innerException) { }
+        protected InvalidAsynchronousStateException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
+    }
     public partial class InvalidEnumArgumentException : System.ArgumentException
     {
         public InvalidEnumArgumentException() { }
index 99985a6..2528380 100644 (file)
@@ -22,6 +22,7 @@
     <Compile Include="System\ComponentModel\IContainer.cs" />
     <Compile Include="System\ComponentModel\ImmutableObjectAttribute.cs" />
     <Compile Include="System\ComponentModel\InitializationEventAttribute.cs" />
+    <Compile Include="System\ComponentModel\InvalidAsynchronousStateException.cs" />
     <Compile Include="System\ComponentModel\InvalidEnumArgumentException.cs" />
     <Compile Include="System\ComponentModel\ISite.cs" />
     <Compile Include="System\ComponentModel\ISupportInitialize.cs" />
index 473cd7d..737d21c 100644 (file)
@@ -8,6 +8,7 @@
 using System.Runtime.Serialization;
 
 // These types were moved down to System.Primitives
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.InvalidAsynchronousStateException))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.InvalidEnumArgumentException))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.Component))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.ISupportInitialize))]
@@ -304,13 +305,6 @@ namespace System.ComponentModel
     {
         public Int64Converter() { }
     }
-    public partial class InvalidAsynchronousStateException : System.ArgumentException
-    {
-        public InvalidAsynchronousStateException() { }
-        public InvalidAsynchronousStateException(string message) { }
-        public InvalidAsynchronousStateException(string message, System.Exception innerException) { }
-        protected InvalidAsynchronousStateException(SerializationInfo info, StreamingContext context) { }
-    }
     public partial interface ITypeDescriptorContext : System.IServiceProvider
     {
         System.ComponentModel.IContainer Container { get; }
index 9d39c46..853a8c5 100644 (file)
@@ -67,7 +67,6 @@
     <Compile Include="System\ComponentModel\IExtenderProvider.cs" />
     <Compile Include="System\ComponentModel\IListSource.cs" />
     <Compile Include="System\ComponentModel\InterlockedBitVector32.cs" />
-    <Compile Include="System\ComponentModel\InvalidAsynchronousStateException.cs" />
     <Compile Include="System\InvariantComparer.cs" />
     <Compile Include="System\ComponentModel\ITypedList.cs" />
     <Compile Include="System\ComponentModel\MemberDescriptor.cs" />