private static IEnumerable <string> GetEnableMediaFiles(StringCollection collection) { foreach (var str in collection) { if (TweetWindowViewModel.IsUploadableExtension(Path.GetExtension(str))) { yield return(str); } } }