diff options
Diffstat (limited to 'src/mscorlib/src/System/Text/Latin1Encoding.cs')
-rw-r--r-- | src/mscorlib/src/System/Text/Latin1Encoding.cs | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/src/mscorlib/src/System/Text/Latin1Encoding.cs b/src/mscorlib/src/System/Text/Latin1Encoding.cs index e456b8533d..3f040b29ad 100644 --- a/src/mscorlib/src/System/Text/Latin1Encoding.cs +++ b/src/mscorlib/src/System/Text/Latin1Encoding.cs @@ -18,7 +18,6 @@ namespace System.Text // Latin1Encoding is a simple override to optimize the GetString version of Latin1Encoding. // because of the best fit cases we can't do this when encoding the string, only when decoding // - [Serializable] internal class Latin1Encoding : EncodingNLS, ISerializable { // Used by Encoding.Latin1 for lazy initialization @@ -30,30 +29,10 @@ namespace System.Text { } - // Constructor called by serialization. - // Note: We use the base GetObjectData however - internal Latin1Encoding(SerializationInfo info, StreamingContext context) : - base(Encoding.ISO_8859_1) - { - // Set up our base, also throws if info was empty - DeserializeEncoding(info, context); - - // Nothing unique to Whidbey for Latin1 - } - - // ISerializable implementation, serialize it as a CodePageEncoding + // ISerializable implementation void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context) { - // Make sure to get the base stuff too This throws if info is null - SerializeEncoding(info, context); - Debug.Assert(info != null, "[Latin1Encoding.GetObjectData] Expected null info to throw"); - - // In Everett this is a CodePageEncoding, so it needs maxCharSize - info.AddValue("CodePageEncoding+maxCharSize", 1); - - // And extras for Everett's wierdness - info.AddValue("CodePageEncoding+m_codePage", this.CodePage); - info.AddValue("CodePageEncoding+dataItem", null); + throw new PlatformNotSupportedException(); } // GetByteCount |