Пример #1
0
        private static IEnumerable <ClipDefinition> ReadClips()
        {
            var applicationPath = Paths.ApplicationPath;
            var clipsPath       = Path.Combine(applicationPath, "res", "videoclips.json");

            return(JSONFileReader.DeserializeJsonFile <List <ClipDefinition> >(clipsPath).ToList());
        }
Пример #2
0
        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());
        }
Пример #3
0
 private void LoadContentList(string filePath)
 {
     ContentList = JSONFileReader.DeserializeJsonFile <List <ClipDefinition> >(filePath).ToList();
 }
Пример #4
0
 public static void DeserializeJsonFile_ThrowsEmpty()
 {
     Assert.Throws <ArgumentException>(() => JSONFileReader.DeserializeJsonFile <List <ClipDefinition> >(""));
 }
Пример #5
0
 public static void DeserializeJsonFile_ThrowsNull()
 {
     Assert.Throws <ArgumentNullException>(() => JSONFileReader.DeserializeJsonFile <List <ClipDefinition> >(null));
 }
Пример #6
0
 public StoryboardReader(string jsonDescPath)
 {
     _jsonDescPath = jsonDescPath;
     _data         = JSONFileReader.DeserializeJsonFile <AllStoryboards>(jsonDescPath);
     _bitmaps      = new Dictionary <string, SKBitmapHolder>();
 }