System.TimeZoneInfo.GetSystemTimeZonesCore C# (CSharp) Method

GetSystemTimeZonesCore() static private method

static private GetSystemTimeZonesCore ( List systemTimeZones ) : void
systemTimeZones List
return void
		static void GetSystemTimeZonesCore (List<TimeZoneInfo> systemTimeZones)
		{
#if !FULL_AOT_DESKTOP
			if (TimeZoneKey != null) {
				foreach (string id in TimeZoneKey.GetSubKeyNames ()) {
					try {
						systemTimeZones.Add (FindSystemTimeZoneById (id));
					} catch {}
				}

				return;
			}
#endif

#if LIBC
			string[] continents = new string [] {"Africa", "America", "Antarctica", "Arctic", "Asia", "Atlantic", "Australia", "Brazil", "Canada", "Chile", "Europe", "Indian", "Mexico", "Mideast", "Pacific", "US"};
			foreach (string continent in continents) {
				try {
					foreach (string zonepath in Directory.GetFiles (Path.Combine (TimeZoneDirectory, continent))) {
						try {
							string id = String.Format ("{0}/{1}", continent, Path.GetFileName (zonepath));
							systemTimeZones.Add (FindSystemTimeZoneById (id));
						} catch (ArgumentNullException) {
						} catch (TimeZoneNotFoundException) {
						} catch (InvalidTimeZoneException) {
						} catch (Exception) {
							throw;
						}
					}
				} catch {}
			}
#else
			throw new NotImplementedException ("This method is not implemented for this platform");
#endif
		}
#endif // !MONODROID && !MONOTOUCH && !XAMMAC