コード例 #1
0
ファイル: TSPlayerService.cs プロジェクト: vinaosb/JuvoPlayer
        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>();
 }