SampleDataset(string name, SampleDownload.Format format) { Name = name; Format = format; Dpi = LookupDpi(name); Layout = new SampleLayout(SampleDownload.Unpack(name, format)); }
public static List <SampleDataset> AllInFormat(SampleDownload.Format format) { return(SampleDownload.Available.Select(n => Get(n, format)).ToList()); }
public static SampleDataset Get(string name, SampleDownload.Format format) { return(Cache.GetOrAdd(Tuple.Create(name, format), t => new SampleDataset(t.Item1, t.Item2))); }