You've already forked linux-packaging-mono
Imported Upstream version 5.18.0.215
Former-commit-id: 77919a0dc17b44051617ced65a58ca041d915216
This commit is contained in:
parent
5e07a812b7
commit
f28a5c0eb4
@@ -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)
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user