Beispiel #1
0
        /// <inheritdoc />
        public bool TryGetTimeZone(int id, [MaybeNullWhen(false)] out TZAbbr value)
        {
            if (!MainStore.ContainsKey(id))
            {
                value = MainStore[id];
                return(true);
            }

            value = null;
            return(false);
        }
Beispiel #2
0
        /// <inheritdoc />
        public bool TryGetTimeZone(string name, [MaybeNullWhen(false)] out TZAbbr value)
        {
            foreach (KeyValuePair <int, TZAbbr> kvp in MainStore)
            {
                if (name == kvp.Value.Name)
                {
                    value = kvp.Value;
                    return(true);
                }
            }

            value = null;
            return(false);
        }
Beispiel #3
0
 /// <inheritdoc />
 public bool IsAbbrAmbiguous(TZAbbr tzAbbr)
 {
     return(IsAbbrAmbiguous(tzAbbr.Abbr));
 }