private async ValueTask PopulateXsltList() { List <ListItem> lstFiles = await XmlManager.GetXslFilesFromLocalDirectoryAsync(cboLanguage.SelectedValue?.ToString() ?? GlobalSettings.DefaultLanguage, _lstCharacters, true); try { await cboXSLT.PopulateWithListItemsAsync(lstFiles); } finally { Utils.ListItemListPool.Return(lstFiles); } }
private async ValueTask PopulateXsltList(CancellationToken token = default) { List <ListItem> lstFiles = await XmlManager.GetXslFilesFromLocalDirectoryAsync( await cboLanguage.DoThreadSafeFuncAsync(x => x.SelectedValue?.ToString(), token) ?? GlobalSettings.DefaultLanguage, _lstCharacters, true); try { await cboXSLT.PopulateWithListItemsAsync(lstFiles, token); } finally { Utils.ListItemListPool.Return(lstFiles); } }