Esempio n. 1
0
        /// <summary>
        /// Initializes or retrieves from the cache <see cref="_languageCodeSuggestions"/>
        /// </summary>
        /// <returns>
        /// List of language code suggestions
        /// </returns>
        internal static IEnumerable <KeyValuePair <string, DType> > GetLanguageCodeSuggestions()
        {
            if (_languageCodeSuggestions == null)
            {
                Interlocked.CompareExchange(
                    ref _languageCodeSuggestions,
                    TexlStrings.SupportedDateTimeLanguageCodes(null).Split(new[] { ',' }).Select(locale => new KeyValuePair <string, DType>(locale, DType.String)),
                    null);
            }

            return(_languageCodeSuggestions);
        }