This repository has been archived by the owner on Nov 1, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 509
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the default globalization implementation for Linux
The change here is just adding some default implmentation to be used for Linux so we can avoid calling any path end up calling Win32 API. The change also will make it easier in the future to determine what functionality needed for Linux to implement the real PAL layer. Note that, the changes here cover most of the globalization implemntation but we may need to do more as needed if we run into any other problem when getting the demo ready
- Loading branch information
Showing
9 changed files
with
662 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
src/System.Private.CoreLib/src/System/Globalization/CalendarData.Dummy.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// Copyright (c) Microsoft. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
using System; | ||
using System.Runtime.InteropServices; | ||
using System.Runtime.CompilerServices; | ||
using System.Diagnostics.Contracts; | ||
using System.Collections.Generic; | ||
|
||
namespace System.Globalization | ||
{ | ||
internal partial class CalendarData | ||
{ | ||
private bool LoadCalendarDataFromSystem(String localeName, CalendarId calendarId) | ||
{ | ||
return true; | ||
} | ||
|
||
internal static CalendarData GetCalendarData(CalendarId calendarId) | ||
{ | ||
return CultureInfo.InvariantCulture.m_cultureData.GetCalendar(calendarId); | ||
} | ||
|
||
internal static int GetCalendars(String localeName, bool useUserOverride, CalendarId[] calendars) | ||
{ | ||
return 1; | ||
} | ||
|
||
private static bool SystemSupportsTaiwaneseCalendar() | ||
{ | ||
return false; | ||
} | ||
|
||
internal static int GetTwoDigitYearMax(CalendarId calendarId) | ||
{ | ||
return 2029; | ||
} | ||
} | ||
} |
Oops, something went wrong.