TimeZoneFactoryListCommonLocalizedNamesAsync Method

Lists the curated set of "most common" time zones for the application's user base, with each zone's localized display name and current UTC offset.

Definition

Namespace: InnerDrive.TimeZones
Assembly: InnerDrive.TimeZones (in InnerDrive.TimeZones.dll) Version: 5.3.9728.0
C#
public Task<IReadOnlyList<LocalizedZoneName>> ListCommonLocalizedNamesAsync(
	CultureInfo? culture = null,
	TimeZoneNameStyle style = TimeZoneNameStyle.Location,
	CancellationToken cancellationToken = default
)

Parameters

culture  CultureInfo  (Optional)
The culture to resolve display names for. If null, CurrentUICulture is used.
style  TimeZoneNameStyle  (Optional)
The TimeZoneNameStyle to resolve.
cancellationToken  CancellationToken  (Optional)
A CancellationToken controlling the request lifetime

Return Value

TaskIReadOnlyListLocalizedZoneName
The zones named in the timeZoneSettings:commonZones configuration key, canonicalized and de-duplicated, in the order the operator configured them. An unset or empty key returns an empty list; a configured ID that does not resolve to a loaded zone is skipped with a Trace message rather than throwing.

Implements

ITimeZoneFactoryListCommonLocalizedNamesAsync(CultureInfo, TimeZoneNameStyle, CancellationToken)

Remarks

If Initialized is false, the method will initialize the factory before returning a result.

See Also