You've already forked linux-packaging-mono
Imported Upstream version 6.6.0.89
Former-commit-id: b39a328747c2f3414dc52e009fb6f0aa80ca2492
This commit is contained in:
parent
cf815e07e0
commit
95fdb59ea6
@@ -136,10 +136,9 @@ namespace System {
|
||||
#if !MONO
|
||||
[System.Security.SecurityCritical] // auto-generated
|
||||
[ResourceExposure(ResourceScope.None)]
|
||||
#endif
|
||||
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
||||
private static extern byte _GetByte(Array array, int index);
|
||||
#if !MONO
|
||||
|
||||
[System.Security.SecuritySafeCritical] // auto-generated
|
||||
public static byte GetByte(Array array, int index)
|
||||
{
|
||||
@@ -167,10 +166,9 @@ namespace System {
|
||||
#if !MONO
|
||||
[System.Security.SecurityCritical] // auto-generated
|
||||
[ResourceExposure(ResourceScope.None)]
|
||||
#endif
|
||||
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
||||
private static extern void _SetByte(Array array, int index, byte value);
|
||||
#if !MONO
|
||||
|
||||
[System.Security.SecuritySafeCritical] // auto-generated
|
||||
public static void SetByte(Array array, int index, byte value)
|
||||
{
|
||||
|
||||
@@ -49,15 +49,17 @@ namespace System.Collections.Generic
|
||||
Contract.Ensures(Contract.Result<EqualityComparer<T>>() != null);
|
||||
|
||||
RuntimeType t = (RuntimeType)typeof(T);
|
||||
// Specialize type byte for performance reasons
|
||||
if (t == typeof(byte)) {
|
||||
return (EqualityComparer<T>)(object)(new ByteEqualityComparer());
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////
|
||||
// KEEP THIS IN SYNC WITH THE DEVIRT CODE
|
||||
// IN METHOD-TO-IR.C
|
||||
/////////////////////////////////////////////////
|
||||
|
||||
// Specialize type byte for performance reasons
|
||||
if (t == typeof(byte)) {
|
||||
return (EqualityComparer<T>)(object)(new ByteEqualityComparer());
|
||||
}
|
||||
|
||||
#if MOBILE
|
||||
// Breaks .net serialization compatibility
|
||||
if (t == typeof (string))
|
||||
|
||||
@@ -186,7 +186,7 @@ namespace System.Globalization
|
||||
// Abbreviated English Era Names are only used for the Japanese calendar.
|
||||
if (!GlobalizationMode.Invariant && calendarId == (int)CalendarId.JAPAN)
|
||||
{
|
||||
this.saAbbrevEnglishEraNames = JapaneseCalendar.EnglishEraNames();
|
||||
this.saAbbrevEnglishEraNames = GetJapaneseEnglishEraNames();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -268,11 +268,7 @@ namespace System.Globalization
|
||||
|
||||
case CalendarId.JAPAN:
|
||||
case CalendarId.JAPANESELUNISOLAR:
|
||||
if (GlobalizationMode.Invariant)
|
||||
{
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
this.saEraNames = JapaneseCalendar.EraNames();
|
||||
this.saEraNames = GetJapaneseEraNames ();
|
||||
break;
|
||||
|
||||
case CalendarId.PERSIAN:
|
||||
@@ -289,6 +285,20 @@ namespace System.Globalization
|
||||
}
|
||||
}
|
||||
|
||||
private static string[] GetJapaneseEraNames()
|
||||
{
|
||||
if (GlobalizationMode.Invariant)
|
||||
throw new PlatformNotSupportedException();
|
||||
return JapaneseCalendar.EraNames();
|
||||
}
|
||||
|
||||
private static string[] GetJapaneseEnglishEraNames()
|
||||
{
|
||||
if (GlobalizationMode.Invariant)
|
||||
throw new PlatformNotSupportedException();
|
||||
return JapaneseCalendar.EnglishEraNames();
|
||||
}
|
||||
|
||||
private void InitializeAbbreviatedEraNames(string localeName, int calendarId)
|
||||
{
|
||||
// Note that the saAbbrevEraNames only include "AD" We don't have localized names for other calendars available from windows
|
||||
|
||||
@@ -1 +1 @@
|
||||
2a97f57ec17d27edda48c7cd045b23ed5d59212a
|
||||
5184305c5aa6f525e12879708e6c4c71405ea9b4
|
||||
@@ -6,7 +6,6 @@
|
||||
namespace System.Text
|
||||
{
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime;
|
||||
using System.Runtime.Remoting;
|
||||
@@ -107,7 +106,7 @@ namespace System.Text
|
||||
#if FEATURE_LATIN1
|
||||
private static volatile Encoding latin1Encoding;
|
||||
#endif
|
||||
static volatile Hashtable encodings;
|
||||
static volatile Dictionary<int, Encoding> encodings;
|
||||
|
||||
//
|
||||
// The following values are from mlang.idl. These values
|
||||
@@ -440,9 +439,8 @@ namespace System.Text
|
||||
// Our Encoding
|
||||
|
||||
// See if we have a hash table with our encoding in it already.
|
||||
if (encodings != null) {
|
||||
result = (Encoding)encodings[codepage];
|
||||
}
|
||||
if (encodings != null)
|
||||
encodings.TryGetValue (codepage, out result);
|
||||
|
||||
if (result == null)
|
||||
{
|
||||
@@ -451,12 +449,11 @@ namespace System.Text
|
||||
{
|
||||
// Need a new hash table
|
||||
// in case another thread beat us to creating the Dictionary
|
||||
if (encodings == null) {
|
||||
encodings = new Hashtable();
|
||||
}
|
||||
if (encodings == null)
|
||||
encodings = new Dictionary<int, Encoding> ();
|
||||
|
||||
// Double check that we don't have one in the table (in case another thread beat us here)
|
||||
if ((result = (Encoding)encodings[codepage]) != null)
|
||||
if (encodings.TryGetValue (codepage, out result))
|
||||
return result;
|
||||
|
||||
// Special case the commonly used Encoding classes here, then call
|
||||
@@ -552,8 +549,8 @@ namespace System.Text
|
||||
break;
|
||||
default:
|
||||
result = (Encoding)(EncodingHelper.InvokeI18N ("GetEncoding", codepage));
|
||||
if (result == null)
|
||||
throw new NotSupportedException(string.Format("Encoding {0} data could not be found. Make sure you have correct international codeset assembly installed and enabled.", codepage));
|
||||
if (result == null)
|
||||
throw new NotSupportedException(string.Format("Encoding {0} data could not be found. Make sure you have correct international codeset assembly installed and enabled.", codepage));
|
||||
break;
|
||||
}
|
||||
#else
|
||||
|
||||
@@ -1316,11 +1316,7 @@ namespace System.Threading
|
||||
{
|
||||
// capture the sync context
|
||||
if (0 == (options & CaptureOptions.IgnoreSyncCtx))
|
||||
#if MONO
|
||||
syncCtxNew = ecCurrent.SynchronizationContext;
|
||||
#else
|
||||
syncCtxNew = (ecCurrent.SynchronizationContext == null) ? null : ecCurrent.SynchronizationContext.CreateCopy();
|
||||
#endif
|
||||
|
||||
#if FEATURE_REMOTING
|
||||
// copy over the Logical Call Context
|
||||
|
||||
Reference in New Issue
Block a user