static CoverViewModel[] GetCovers(string combinedCoverURIs) { string[] splits = combinedCoverURIs.Split(";".ToCharArray(), System.StringSplitOptions.RemoveEmptyEntries); CoverViewModel[] covers = new CoverViewModel[] { CoverViewModel.Default, CoverViewModel.Default, CoverViewModel.Default }; for (int i = 0; i < Math.Min(3, splits.Length); ++i) { covers[i] = new CoverViewModel() { SourceURI = splits[i] }; } return(covers); }
public static CoverViewModel[] GetCovers(IList <string> uris) { if (uris == null) { return new CoverViewModel[] { CoverViewModel.Default, CoverViewModel.Default, CoverViewModel.Default } } ; CoverViewModel[] covers = new CoverViewModel[] { CoverViewModel.Default, CoverViewModel.Default, CoverViewModel.Default }; for (int i = 0; i < Math.Min(3, uris.Count); ++i) { covers[i] = new CoverViewModel() { SourceURI = uris[i] }; } return(covers); }