private static IEnumerable <ClipDefinition> ReadClips() { var applicationPath = Paths.ApplicationPath; var clipsPath = Path.Combine(applicationPath, "res", "videoclips.json"); return(JSONFileReader.DeserializeJsonFile <List <ClipDefinition> >(clipsPath).ToList()); }
public List <Clip> ReadClips() { var clipsPath = Path.Combine(ApplicationPath, "shared", "res", "videoclips.json"); return(JSONFileReader.DeserializeJsonFile <List <ClipDefinition> >(clipsPath).Select( o => new Clip { Image = Path.Combine(ApplicationPath, "res", o.Poster), Description = o.Description, Source = o.Url, Title = o.Title, ClipDetailsHandle = o } ).ToList()); }
private void LoadContentList(string filePath) { ContentList = JSONFileReader.DeserializeJsonFile <List <ClipDefinition> >(filePath).ToList(); }
public static void DeserializeJsonFile_ThrowsEmpty() { Assert.Throws <ArgumentException>(() => JSONFileReader.DeserializeJsonFile <List <ClipDefinition> >("")); }
public static void DeserializeJsonFile_ThrowsNull() { Assert.Throws <ArgumentNullException>(() => JSONFileReader.DeserializeJsonFile <List <ClipDefinition> >(null)); }
public StoryboardReader(string jsonDescPath) { _jsonDescPath = jsonDescPath; _data = JSONFileReader.DeserializeJsonFile <AllStoryboards>(jsonDescPath); _bitmaps = new Dictionary <string, SKBitmapHolder>(); }