Imported Upstream version 4.8.0.309

Former-commit-id: 5f9c6ae75f295e057a7d2971f3a6df4656fa8850
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2016-11-10 13:04:39 +00:00
parent ee1447783b
commit 94b2861243
4912 changed files with 390737 additions and 49310 deletions

View File

@@ -11,7 +11,9 @@ namespace System.Runtime.Serialization.Json
using System.IO;
using System.Text;
using System.Xml;
#if !MONO
using System.ServiceModel;
#endif
using System.Collections;
using DataContractDictionary = System.Collections.Generic.Dictionary<System.Xml.XmlQualifiedName, DataContract>;
using System.Runtime.CompilerServices;

View File

@@ -7,7 +7,9 @@ namespace System.Runtime.Serialization.Json
using System.Threading;
using System.Xml;
using System.Diagnostics;
#if !MONO
using System.ServiceModel;
#endif
using System.Collections.Generic;
using System.Security;

View File

@@ -9,7 +9,9 @@ namespace System.Runtime.Serialization.Json
using System.Runtime.Serialization;
using System.Security;
using System.Reflection;
#if !MONO
using System.ServiceModel;
#endif
using System.Xml;
#if USE_REFEMIT

View File

@@ -7,7 +7,9 @@
namespace System.Runtime.Serialization.Json
{
using System.IO;
#if !MONO
using System.ServiceModel;
#endif
using System.Text;
using System.Xml;
using System.Security;

View File

@@ -5,7 +5,9 @@
namespace System.Runtime.Serialization.Json
{
using System.Xml;
#if !MONO
using System.ServiceModel;
#endif
using System.Runtime.Serialization;
using System.Globalization;

View File

@@ -5,7 +5,9 @@
namespace System.Runtime.Serialization.Json
{
using System.Xml;
#if !MONO
using System.ServiceModel;
#endif
using System.Runtime.Serialization;
using System.Globalization;

View File

@@ -9,7 +9,9 @@ namespace System.Runtime.Serialization.Json
using System.Text;
using System.Xml;
using System.IO;
#if !MONO
using System.ServiceModel;
#endif
using System.Runtime.Serialization.Json;
using System.Runtime.CompilerServices;

View File

@@ -6,7 +6,9 @@ namespace System.Runtime.Serialization.Json
{
using System.Xml;
using System.Globalization;
#if !MONO
using System.ServiceModel;
#endif
#if USE_REFEMIT
public class JsonWriterDelegator : XmlWriterDelegator
@@ -202,7 +204,15 @@ namespace System.Runtime.Serialization.Json
// This will break round-tripping of these dates (see bug 9690 in CSD Developer Framework)
if (value.Kind != DateTimeKind.Utc)
{
long tickCount = value.Ticks - TimeZone.CurrentTimeZone.GetUtcOffset(value).Ticks;
long tickCount;
if (!LocalAppContextSwitches.DoNotUseTimeZoneInfo)
{
tickCount = value.Ticks - TimeZoneInfo.Local.GetUtcOffset(value).Ticks;
}
else
{
tickCount = value.Ticks - TimeZone.CurrentTimeZone.GetUtcOffset(value).Ticks;
}
if ((tickCount > DateTime.MaxValue.Ticks) || (tickCount < DateTime.MinValue.Ticks))
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(
@@ -218,7 +228,15 @@ namespace System.Runtime.Serialization.Json
case DateTimeKind.Unspecified:
case DateTimeKind.Local:
// +"zzzz";
TimeSpan ts = TimeZone.CurrentTimeZone.GetUtcOffset(value.ToLocalTime());
TimeSpan ts;
if (!LocalAppContextSwitches.DoNotUseTimeZoneInfo)
{
ts = TimeZoneInfo.Local.GetUtcOffset(value.ToLocalTime());
}
else
{
ts = TimeZone.CurrentTimeZone.GetUtcOffset(value.ToLocalTime());
}
if (ts.Ticks < 0)
{
writer.WriteString("-");

View File

@@ -6,7 +6,9 @@ namespace System.Runtime.Serialization.Json
{
using System.Globalization;
using System.IO;
#if !MONO
using System.ServiceModel;
#endif
using System.Text;
using System.Runtime.Serialization;
using System.Collections.Generic;

View File

@@ -10,7 +10,9 @@ namespace System.Runtime.Serialization.Json
using System.Runtime;
using System.Runtime.Serialization;
using System.Security;
#if !MONO
using System.ServiceModel;
#endif
using System.Text;
using System.Xml;

View File

@@ -8,7 +8,9 @@ namespace System.Runtime.Serialization.Json
using System.Collections.Generic;
using System.Runtime;
using System.Security;
#if !MONO
using System.ServiceModel;
#endif
using System.Text;
using System.Xml;

View File

@@ -3,7 +3,9 @@ using System.Collections.Generic;
using System.Text;
using System.Xml;
using System.Reflection;
#if !MONO
using System.ServiceModel;
#endif
using System.Collections;
namespace System.Runtime.Serialization.Json