Ejemplo n.º 1
0
 /// <summary>
 /// Returns the current CLDR version
 /// </summary>
 /// <stable>ICU 4.2</stable>
 public static VersionInfo GetCLDRVersion()
 {
     // fetching this data should be idempotent.
     if (gCLDRVersion == null)
     {
         // from ZoneMeta.java
         UResourceBundle supplementalDataBundle = UResourceBundle.GetBundleInstance(ICUData.IcuBaseName, "supplementalData", ICUResourceBundle.IcuDataAssembly);
         UResourceBundle cldrVersionBundle      = supplementalDataBundle.Get("cldrVersion");
         gCLDRVersion = VersionInfo.GetInstance(cldrVersionBundle.GetString());
     }
     return(gCLDRVersion);
 }
Ejemplo n.º 2
0
 /**
  * Returns the current CLDR version
  * @stable ICU 4.2
  */
 public static VersionInfo GetCLDRVersion()
 {
     // fetching this data should be idempotent.
     if (gCLDRVersion == null)
     {
         // from ZoneMeta.java
         UResourceBundle supplementalDataBundle = UResourceBundle.GetBundleInstance(ICUData.ICU_BASE_NAME, "supplementalData", ICUResourceBundle.ICU_DATA_CLASS_LOADER);
         UResourceBundle cldrVersionBundle      = supplementalDataBundle.Get("cldrVersion");
         gCLDRVersion = VersionInfo.GetInstance(cldrVersionBundle.GetString());
     }
     return(gCLDRVersion);
 }
Ejemplo n.º 3
0
        internal static string GetTZDataVersion()
        {
            if (TZDATA_VERSION == null)
            {
                return(LazyInitializer.EnsureInitialized(ref TZDATA_VERSION, () =>
                {
                    UResourceBundle tzbundle = UResourceBundle.GetBundleInstance("Impl/Data/icudt"
#pragma warning disable 612, 618
                                                                                 + VersionInfo.IcuDataVersionPath, "zoneinfo64");
#pragma warning restore 612, 618
                    return tzbundle.GetString("TZVersion");
                }));
            }
            return(TZDATA_VERSION);
        }
Ejemplo n.º 4
0
 internal static string GetTZDataVersion()
 {
     if (TZDATA_VERSION == null)
     {
         lock (syncLock)
         {
             if (TZDATA_VERSION == null)
             {
                 UResourceBundle tzbundle = UResourceBundle.GetBundleInstance("Impl/Data/icudt"
                                                                              + VersionInfo.ICU_DATA_VERSION_PATH, "zoneinfo64");
                 TZDATA_VERSION = tzbundle.GetString("TZVersion");
             }
         }
     }
     return(TZDATA_VERSION);
 }
Ejemplo n.º 5
0
        internal static string GetTZDataVersion()
        {
            if (TZDATA_VERSION == null)
            {
                lock (syncLock)
                {
                    if (TZDATA_VERSION == null)
                    {
                        UResourceBundle tzbundle = UResourceBundle.GetBundleInstance("Impl/Data/icudt"
#pragma warning disable 612, 618
                                                                                     + VersionInfo.IcuDataVersionPath, "zoneinfo64");
#pragma warning restore 612, 618
                        TZDATA_VERSION = tzbundle.GetString("TZVersion");
                    }
                }
            }
            return(TZDATA_VERSION);
        }