Clean up and prepare FileLoadException.cs for move to Shared Partition. (#10764)
authorAtsushi Kanamori <AtsushiKan@users.noreply.github.com>
Thu, 6 Apr 2017 14:45:58 +0000 (07:45 -0700)
committerGitHub <noreply@github.com>
Thu, 6 Apr 2017 14:45:58 +0000 (07:45 -0700)
commit82b8a644a560e4c688ba6d59ac5fb86bd24b68ad
treea3e7c6b2f4fe73849fb30b83cf0e14e04db86700
parent4abb8b63b2e51550ae3e0a8b04129deaf99bdf7e
Clean up and prepare FileLoadException.cs for move to Shared Partition. (#10764)

* String => string

* Replace fields with autoprops.

* Turn Type.FullName call to Type.ToString() in ToString().

Avoids MissingMetadataExceptions on CoreRT.

Assuming metadata exists, ToString() and FullName()
still generates the same string except in the weird
case where an app subclasses FileLoadException
with a generic exception type - in which case,
the ToString() version is actually more readable.

* Get rid of useless try-catch around FusionLog calls.

FusionLog is now just a normal property and an answer
to a trivia question - it won't throw SecurityException.

* Get rid of low-value SetMessageField() middleman.

* Split off the stuff we don't want to share.

* The complementary carwash...

* Don't conditionalize FusionLog serialization.
src/mscorlib/System.Private.CoreLib.csproj
src/mscorlib/src/System/IO/FileLoadException.CoreCLR.cs [new file with mode: 0644]
src/mscorlib/src/System/IO/FileLoadException.cs