Пример #1
0
 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);
 }
Пример #2
0
 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);
 }