From 05d237d42b1a23eb3d1561544217ee01f6330579 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Wed, 18 Jan 2017 08:22:54 -0500 Subject: [PATCH] Fix DateTimeFormatInfo serialization on Unix The Unix copy of the src is missing some [NonSerialized] attribution on a few of its fields, one of which is for a field of type TokenHashValue, which isn't [Serializable]. This is causing DateTimeFormatInfo to itself fail to serialize. Commit migrated from https://github.com/dotnet/coreclr/commit/33b5d299b62ab2d631221967112844e7cda2d5fc --- .../src/mscorlib/corefx/System/Globalization/DateTimeFormatInfo.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/coreclr/src/mscorlib/corefx/System/Globalization/DateTimeFormatInfo.cs b/src/coreclr/src/mscorlib/corefx/System/Globalization/DateTimeFormatInfo.cs index 216fc60..3811974 100644 --- a/src/coreclr/src/mscorlib/corefx/System/Globalization/DateTimeFormatInfo.cs +++ b/src/coreclr/src/mscorlib/corefx/System/Globalization/DateTimeFormatInfo.cs @@ -2163,7 +2163,7 @@ namespace System.Globalization // // Positive TimeSpan Pattern // - + [NonSerialized] private string _fullTimeSpanPositivePattern; internal String FullTimeSpanPositivePattern { @@ -2187,7 +2187,7 @@ namespace System.Globalization // // Negative TimeSpan Pattern // - + [NonSerialized] private string _fullTimeSpanNegativePattern; internal String FullTimeSpanNegativePattern { @@ -2343,7 +2343,7 @@ namespace System.Globalization // // DateTimeFormatInfo tokenizer. This is used by DateTime.Parse() to break input string into tokens. // - + [NonSerialized] private TokenHashValue[] _dtfiTokenHash; private const int TOKEN_HASH_SIZE = 199; -- 2.7.4