Imported Upstream version 4.0.2.4

Former-commit-id: de0c2bbc3d900ab3bd764cd6c9d9062472ce7456
This commit is contained in:
Xamarin Public Jenkins
2015-06-10 19:29:21 -04:00
parent 98e85815fb
commit cae8e1b2db
46 changed files with 249 additions and 134 deletions

View File

@@ -7,7 +7,7 @@ using System.Security;
namespace System.Text
{
internal static class EncodingHelper
internal static partial class EncodingHelper
{
//
// Only internal, to be used by the class libraries: Unmarked and non-input-validating
@@ -71,6 +71,7 @@ internal static class EncodingHelper
[MethodImpl (MethodImplOptions.InternalCall)]
extern internal static string InternalCodePage (ref int code_page);
#if !MONOTOUCH
internal static Encoding GetDefaultEncoding ()
{
Encoding enc = null;
@@ -105,6 +106,7 @@ internal static class EncodingHelper
}
return enc;
}
#endif
// Loaded copy of the "I18N" assembly. We need to move
// this into a class in "System.Private" eventually.

View File

@@ -592,7 +592,7 @@ namespace System
public AdjustmentRule [] GetAdjustmentRules ()
{
if (!supportsDaylightSavingTime)
if (!supportsDaylightSavingTime || adjustmentRules == null)
return new AdjustmentRule [0];
else
return (AdjustmentRule []) adjustmentRules.Clone ();
@@ -1254,8 +1254,10 @@ namespace System
tz = CreateCustomTimeZone (id, baseUtcOffset, id, standardDisplayName, daylightDisplayName, ValidateRules (adjustmentRules).ToArray ());
}
if (storeTransition)
if (storeTransition && transitions.Count > 0) {
tz.transitions = transitions;
tz.supportsDaylightSavingTime = true;
}
return tz;
}