You've already forked linux-packaging-mono
Imported Upstream version 4.8.0.309
Former-commit-id: 5f9c6ae75f295e057a7d2971f3a6df4656fa8850
This commit is contained in:
parent
ee1447783b
commit
94b2861243
@@ -1 +1 @@
|
||||
c63c76f91537ad23db1f24fb585d429c313200cd
|
||||
2ed1d48643d071051cbb40b991b398d60b8f2f8f
|
@@ -9,7 +9,9 @@ namespace System.Runtime.Serialization.Diagnostics
|
||||
using System.Globalization;
|
||||
using System.Runtime;
|
||||
using System.Runtime.Diagnostics;
|
||||
#if !MONO
|
||||
using System.ServiceModel.Diagnostics;
|
||||
#endif
|
||||
|
||||
static class TraceUtility
|
||||
{
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -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("-");
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -75,7 +75,7 @@ namespace System.Runtime.Serialization
|
||||
if (!Schemas.Contains(Globals.SerializationNamespace))
|
||||
{
|
||||
StringReader reader = new StringReader(Globals.SerializationSchema);
|
||||
XmlSchema schema = XmlSchema.Read(reader, null);
|
||||
XmlSchema schema = XmlSchema.Read(new XmlTextReader(reader) { DtdProcessing = DtdProcessing.Prohibit }, null);
|
||||
if (schema == null)
|
||||
throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.GetString(SR.CouldNotReadSerializationSchema, Globals.SerializationNamespace)));
|
||||
Schemas.Add(schema);
|
||||
|
@@ -51,7 +51,7 @@ namespace System.Runtime.Serialization
|
||||
if (!schemaSet.Contains(Globals.SerializationNamespace))
|
||||
{
|
||||
StringReader reader = new StringReader(Globals.SerializationSchema);
|
||||
XmlSchema schema = XmlSchema.Read(reader, null);
|
||||
XmlSchema schema = XmlSchema.Read(new XmlTextReader(reader) { DtdProcessing = DtdProcessing.Prohibit }, null);
|
||||
if (schema == null)
|
||||
throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.GetString(SR.CouldNotReadSerializationSchema, Globals.SerializationNamespace)));
|
||||
schemaSet.Add(schema);
|
||||
|
@@ -9,7 +9,9 @@ namespace System.Runtime.Serialization
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.Diagnostics;
|
||||
#if !MONO
|
||||
using System.ServiceModel.Diagnostics;
|
||||
#endif
|
||||
using System.Text;
|
||||
using System.Xml;
|
||||
using System.Xml.Serialization;
|
||||
|
@@ -14,7 +14,9 @@ namespace System.Runtime.Serialization
|
||||
using System.Xml;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml.Serialization;
|
||||
#if !MONO
|
||||
using System.ServiceModel.Diagnostics;
|
||||
#endif
|
||||
using System.Security;
|
||||
using System.Security.Permissions;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
@@ -67,7 +67,6 @@ namespace System.Runtime.Serialization
|
||||
nodes[i].WriteTo(xmlWriter);
|
||||
}
|
||||
|
||||
#if !MOBILE
|
||||
internal static string AddDefaultSchemaMethodName = "AddDefaultSchema";
|
||||
public static void AddDefaultSchema(XmlSchemaSet schemas, XmlQualifiedName typeQName)
|
||||
{
|
||||
@@ -77,6 +76,5 @@ namespace System.Runtime.Serialization
|
||||
throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("typeQName");
|
||||
SchemaExporter.AddDefaultXmlType(schemas, typeQName.Name, typeQName.Namespace);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user