Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ NlsGetCalendars()

static unsafe int System.Globalization.CalendarData.NlsGetCalendars ( string localeName,
bool useUserOverride,
CalendarId[] calendars )
inlinestaticprivate

Definition at line 1007 of file CalendarData.cs.

1008 {
1009 NlsEnumCalendarsData value = default(NlsEnumCalendarsData);
1010 value.userOverride = 0;
1011 value.calendars = new List<int>();
1012 if (useUserOverride)
1013 {
1014 int localeInfoExInt = CultureData.GetLocaleInfoExInt(localeName, 4105u);
1015 if (localeInfoExInt != 0)
1016 {
1017 value.userOverride = localeInfoExInt;
1018 value.calendars.Add(localeInfoExInt);
1019 }
1020 }
1022 for (int i = 0; i < Math.Min(calendars.Length, value.calendars.Count); i++)
1023 {
1024 calendars[i] = (CalendarId)value.calendars[i];
1025 }
1026 return value.calendars.Count;
1027 }
static unsafe bool EnumCalendarInfoExEx(delegate *unmanaged< char *, uint, IntPtr, void *, BOOL > pCalInfoEnumProcExEx, string lpLocaleName, uint Calendar, string lpReserved, uint CalType, void *lParam)
void Add(TKey key, TValue value)
static unsafe Interop.BOOL EnumCalendarsCallback(char *lpCalendarInfoString, uint calendar, IntPtr reserved, void *lParam)

References System.Collections.Generic.Dictionary< TKey, TValue >.Add(), Interop.Kernel32.EnumCalendarInfoExEx(), System.Globalization.CalendarData.EnumCalendarsCallback(), System.Globalization.CultureData.GetLocaleInfoExInt(), System.Math.Min(), and System.value.

Referenced by System.Globalization.CalendarData.GetCalendarsCore().