TimeZoneFactorySearchLocalizedNamesAsync Method
Performs a progressive (type-ahead) search for zones whose localized display name,
exemplar city, or TZDB ID matches query.
Namespace: InnerDrive.TimeZonesAssembly: InnerDrive.TimeZones (in InnerDrive.TimeZones.dll) Version: 5.3.9728.0
public Task<IReadOnlyList<LocalizedZoneName>> SearchLocalizedNamesAsync(
string? query,
CultureInfo? culture = null,
TimeZoneNameStyle style = TimeZoneNameStyle.Location,
int maxResults = 10,
CancellationToken cancellationToken = default
)
- query String
- The user's in-progress search text.
- culture CultureInfo (Optional)
- The culture to search and resolve display names in. If null,
CurrentUICulture is used.
- style TimeZoneNameStyle (Optional)
- The TimeZoneNameStyle to resolve.
- maxResults Int32 (Optional)
- The maximum number of results to return. A value of zero or
less returns every match.
- cancellationToken CancellationToken (Optional)
- A CancellationToken
controlling the request lifetime
TaskIReadOnlyListLocalizedZoneNameAn empty list if
query, once trimmed, has fewer text elements
than
timeZoneSettings:searchMinimumLength (default 3); otherwise the matches,
relevance-ranked, capped at
maxResults.
ITimeZoneFactorySearchLocalizedNamesAsync(String, CultureInfo, TimeZoneNameStyle, Int32, CancellationToken) The length check happens before initialization is ensured or any index is
built, so sub-threshold keystrokes are inexpensive. The per-locale search index is built
lazily on the first qualifying search and is rebuilt after
Clear, after a
reload, and once older than
timeZoneSettings:searchIndexLifetimeSeconds
(default 3600).