Imported Upstream version 5.18.0.215

Former-commit-id: 77919a0dc17b44051617ced65a58ca041d915216
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2018-11-29 08:35:58 +00:00
parent 5e07a812b7
commit f28a5c0eb4
51 changed files with 98 additions and 44 deletions

View File

@@ -1 +1 @@
938175296af476579141f78cdb7065a2b5e8c282
0966d02146233778bc2bff5c642a72b4db22341e

View File

@@ -1 +1 @@
159974bcdc047e01eead76b3c2d1e87b01f73ebf
2ae9ab2e8d1f583ad2c036454fb3b79ecbc39035

View File

@@ -1 +1 @@
3fc7686da8fa77fe19257d65c6feb6dffef07bae
0fc46f55fa06c9cc6efd0610c0aca16bae0936d0

View File

@@ -3,13 +3,16 @@
// See the LICENSE file in the project root for more information.
using System.Diagnostics;
using System.Runtime.Serialization;
namespace System.Text
{
#if MONO
[System.Serializable]
#endif
public sealed class DecoderReplacementFallback : DecoderFallback, ISerializable
#else
public sealed class DecoderReplacementFallback : DecoderFallback
#endif
{
// Our variables
private String _strDefault;
@@ -19,6 +22,16 @@ namespace System.Text
{
}
#if MONO
internal DecoderReplacementFallback(SerializationInfo info, StreamingContext context)
{
try { _strDefault = info.GetString("strDefault"); } // for old mono and .NET 4.x
catch { _strDefault = info.GetString("_strDefault"); }
}
void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context) => info.AddValue("strDefault", _strDefault);
#endif
public DecoderReplacementFallback(String replacement)
{
if (replacement == null)

View File

@@ -5,13 +5,16 @@
using System;
using System.Runtime;
using System.Diagnostics;
using System.Runtime.Serialization;
namespace System.Text
{
#if MONO
[Serializable]
#endif
public sealed class EncoderReplacementFallback : EncoderFallback, ISerializable
#else
public sealed class EncoderReplacementFallback : EncoderFallback
#endif
{
// Our variables
private String _strDefault;
@@ -21,6 +24,16 @@ namespace System.Text
{
}
#if MONO
internal EncoderReplacementFallback(SerializationInfo info, StreamingContext context)
{
try { _strDefault = info.GetString("strDefault"); } // for old mono and .NET 4.x
catch { _strDefault = info.GetString("_strDefault"); }
}
void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context) => info.AddValue("strDefault", _strDefault);
#endif
public EncoderReplacementFallback(String replacement)
{
// Must not be null