Beispiel #1
0
        private static CultureData CreateCultureData(string cultureName, bool useUserOverride)
        {
            CultureData culture = new CultureData();
            culture._bUseOverrides = useUserOverride;
            culture._sRealName = cultureName;

            // Ask native code if that one's real
            if (culture.InitCultureData() == false)
            {
                if (culture.InitCompatibilityCultureData() == false)
                {
                    return null;
                }
            }

            return culture;
        }
Beispiel #2
0
        private static CultureData CreateCultureData(string cultureName, bool useUserOverride)
        {
            CultureData culture = new CultureData();
            culture.bUseOverrides = useUserOverride;
            culture.sRealName = cultureName;

            // Ask native code if that one's real
            if (culture.InitCultureData() == false)
            {
#if !FEATURE_CORECLR
                if (culture.InitCompatibilityCultureData() == false
                 && culture.InitLegacyAlternateSortData() == false)
#endif
                {
                    return null;
                }
            }

            return culture;
        }
 private static CultureData CreateCultureData(string cultureName, bool useUserOverride)
 {
     CultureData data = new CultureData {
         bUseOverrides = useUserOverride,
         sRealName = cultureName
     };
     if ((!data.InitCultureData() && !data.InitCompatibilityCultureData()) && !data.InitLegacyAlternateSortData())
     {
         return null;
     }
     return data;
 }