summaryrefslogtreecommitdiff
path: root/src/mscorlib/src/System/Text/UTF7Encoding.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/mscorlib/src/System/Text/UTF7Encoding.cs')
-rw-r--r--src/mscorlib/src/System/Text/UTF7Encoding.cs52
1 files changed, 3 insertions, 49 deletions
diff --git a/src/mscorlib/src/System/Text/UTF7Encoding.cs b/src/mscorlib/src/System/Text/UTF7Encoding.cs
index 372af0da37..0ac3b66889 100644
--- a/src/mscorlib/src/System/Text/UTF7Encoding.cs
+++ b/src/mscorlib/src/System/Text/UTF7Encoding.cs
@@ -13,7 +13,6 @@ using System.Diagnostics.Contracts;
namespace System.Text
{
- [Serializable]
public class UTF7Encoding : Encoding
{
private const String base64Chars =
@@ -832,7 +831,6 @@ namespace System.Text
return charCount;
}
- [Serializable]
// Of all the amazing things... This MUST be Decoder so that our com name
// for System.Text.Decoder doesn't change
private sealed class Decoder : DecoderNLS, ISerializable
@@ -849,32 +847,10 @@ namespace System.Text
// base calls reset
}
- // Constructor called by serialization, have to handle deserializing from Everett
- internal Decoder(SerializationInfo info, StreamingContext context)
- {
- // Any info?
- if (info == null) throw new ArgumentNullException(nameof(info));
- Contract.EndContractBlock();
-
- // Get common info
- this.bits = (int)info.GetValue("bits", typeof(int));
- this.bitCount = (int)info.GetValue("bitCount", typeof(int));
- this.firstByte = (bool)info.GetValue("firstByte", typeof(bool));
- this.m_encoding = (Encoding)info.GetValue("encoding", typeof(Encoding));
- }
-
// ISerializable implementation, get data for this object
void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
{
- // Any info?
- if (info == null) throw new ArgumentNullException(nameof(info));
- Contract.EndContractBlock();
-
- // Save Whidbey data
- info.AddValue("encoding", this.m_encoding);
- info.AddValue("bits", this.bits);
- info.AddValue("bitCount", this.bitCount);
- info.AddValue("firstByte", this.firstByte);
+ throw new PlatformNotSupportedException();
}
public override void Reset()
@@ -898,7 +874,6 @@ namespace System.Text
}
}
- [Serializable]
// Of all the amazing things... This MUST be Encoder so that our com name
// for System.Text.Encoder doesn't change
private sealed class Encoder : EncoderNLS, ISerializable
@@ -913,30 +888,10 @@ namespace System.Text
// base calls reset
}
- // Constructor called by serialization, have to handle deserializing from Everett
- internal Encoder(SerializationInfo info, StreamingContext context)
- {
- // Any info?
- if (info == null) throw new ArgumentNullException(nameof(info));
- Contract.EndContractBlock();
-
- // Get common info
- this.bits = (int)info.GetValue("bits", typeof(int));
- this.bitCount = (int)info.GetValue("bitCount", typeof(int));
- this.m_encoding = (Encoding)info.GetValue("encoding", typeof(Encoding));
- }
-
- // ISerializable implementation, get data for this object
+ // ISerializable implementation
void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
{
- // Any info?
- if (info == null) throw new ArgumentNullException(nameof(info));
- Contract.EndContractBlock();
-
- // Save Whidbey data
- info.AddValue("encoding", this.m_encoding);
- info.AddValue("bits", this.bits);
- info.AddValue("bitCount", this.bitCount);
+ throw new PlatformNotSupportedException();
}
public override void Reset()
@@ -959,7 +914,6 @@ namespace System.Text
// Preexisting UTF7 behavior for bad bytes was just to spit out the byte as the next char
// and turn off base64 mode if it was in that mode. We still exit the mode, but now we fallback.
- [Serializable]
private sealed class DecoderUTF7Fallback : DecoderFallback
{
// Construction. Default replacement fallback uses no best fit and ? replacement string