Scale back [Serializable] CoreFX types (dotnet/corefx#19742)

* Remove SerializableAttribute from many CoreFX types that will not be serializable.

* Removes serialization tests for types that are no longer serializable and fixes serializing a couple of types. Includes marking some internal serializable types as public so that they'll be reflectible with .NET Native.

* Remove unneeded pragmas

* Update based on review comments


Commit migrated from https://github.com/dotnet/corefx/commit/6dd451f51451a7d0ceea6104b51bd17005e9a0e6
This commit is contained in:
Morgan Brown authored and Stephen Toub committed 2017-05-16 18:16:29 -04:00
1 parent 8ab7794e6c
commit 975ad3c685
460 files changed
+42 -858

No files matched your search

@@ -51,7 +51,6 @@ namespace System.IO
protected override void Dispose(bool disposing) { }
public void EndInit() { }
}
[Serializable]
public partial class InternalBufferOverflowException : System.SystemException
{
public InternalBufferOverflowException() { }
@@ -9,7 +9,6 @@ namespace System.IO
/// <devdoc>
/// The exception that is thrown when the internal buffer overflows.
/// </devdoc>
[Serializable]
public class InternalBufferOverflowException : SystemException
{
/// <devdoc>
@@ -36,11 +36,5 @@ namespace System.IO.Tests
Assert.Equal(message, ide.Message);
Assert.Same(innerException, ide.InnerException);
}
[Fact]
public static void ExceptionRoundtrips()
{
BinaryFormatterHelpers.AssertRoundtrips(new InternalBufferOverflowException());
}
}
}