private int GetLocaleInfo(LocaleNumberData type) { Debug.Assert(!GlobalizationMode.Invariant); Debug.Assert(_sWindowsName != null, "[CultureData.GetLocaleInfo(LocaleNumberData)] Expected _sWindowsName to be populated already"); switch (type) { case LocaleNumberData.CalendarType: // returning 0 will cause the first supported calendar to be returned, which is the preferred calendar return(0); } int value = 0; bool result = Interop.GlobalizationInterop.GetLocaleInfoInt(_sWindowsName, (uint)type, ref value); if (!result) { // Failed, just use 0 Debug.Assert(false, "[CultureData.GetLocaleInfo(LocaleNumberData)] failed"); } return(value); }
private int GetLocaleInfo(LocaleNumberData type) { uint lctype = (uint)type; // Fix lctype if we don't want overrides if (!UseUserOverride) { lctype |= Interop.Kernel32.LOCALE_NOUSEROVERRIDE; } // Ask OS for data, note that we presume it returns success, so we have to know that // sWindowsName is valid before calling. Debug.Assert(_sWindowsName != null, "[CultureData.DoGetLocaleInfoInt] Expected _sWindowsName to be populated by already"); return(GetLocaleInfoExInt(_sWindowsName, lctype)); }
private int GetLocaleInfo(LocaleNumberData type) { // TODO: Implement this fully. switch (type) { case LocaleNumberData.LanguageId: return(127); case LocaleNumberData.MeasurementSystem: return(0); case LocaleNumberData.FractionalDigitsCount: return(2); case LocaleNumberData.NegativeNumberFormat: return(1); case LocaleNumberData.MonetaryFractionalDigitsCount: return(2); case LocaleNumberData.PositiveMonetaryNumberFormat: return(0); case LocaleNumberData.NegativeMonetaryNumberFormat: return(0); case LocaleNumberData.CalendarType: return(1); case LocaleNumberData.FirstWeekOfYear: return(0); case LocaleNumberData.ReadingLayout: return(0); case LocaleNumberData.NegativePercentFormat: return(0); case LocaleNumberData.PositivePercentFormat: return(0); default: Contract.Assert(false, "Unmatched case in GetLocaleInfo(LocaleNumberData)"); throw new NotImplementedException(); } }
private int GetLocaleInfo(LocaleNumberData type) { Contract.Assert(_sWindowsName != null, "[CultureData.GetLocaleInfo(LocaleNumberData)] Expected _sWindowsName to be populated already"); switch (type) { case LocaleNumberData.CalendarType: // returning 0 will cause the first supported calendar to be returned, which is the preferred calendar return 0; } int value = 0; bool result = Interop.GlobalizationInterop.GetLocaleInfoInt(_sWindowsName, (uint)type, ref value); if (!result) { // Failed, just use 0 Contract.Assert(false, "[CultureData.GetLocaleInfo(LocaleNumberData)] failed"); } return value; }
private int GetLocaleInfo(LocaleNumberData type) { return(0); }
private int GetLocaleInfo(LocaleNumberData type) { uint lctype = (uint)type; // Fix lctype if we don't want overrides if (!UseUserOverride) { lctype |= LOCALE_NOUSEROVERRIDE; } // Ask OS for data, note that we presume it returns success, so we have to know that // sWindowsName is valid before calling. Contract.Assert(_sWindowsName != null, "[CultureData.DoGetLocaleInfoInt] Expected _sWindowsName to be populated by already"); int result = Interop.mincore.GetLocaleInfoExInt(_sWindowsName, lctype); return result; }
private int GetLocaleInfo(LocaleNumberData type) { return 0; }
private int GetLocaleInfo(LocaleNumberData type) { // TODO: Implement this fully. switch (type) { case LocaleNumberData.LanguageId: return 127; case LocaleNumberData.MeasurementSystem: return 0; case LocaleNumberData.FractionalDigitsCount: return 2; case LocaleNumberData.NegativeNumberFormat: return 1; case LocaleNumberData.MonetaryFractionalDigitsCount: return 2; case LocaleNumberData.PositiveMonetaryNumberFormat: return 0; case LocaleNumberData.NegativeMonetaryNumberFormat: return 0; case LocaleNumberData.CalendarType: return 1; case LocaleNumberData.FirstWeekOfYear: return 0; case LocaleNumberData.ReadingLayout: return 0; case LocaleNumberData.NegativePercentFormat: return 0; case LocaleNumberData.PositivePercentFormat: return 0; default: Contract.Assert(false, "Unmatched case in GetLocaleInfo(LocaleNumberData)"); throw new NotImplementedException(); } }