コード例 #1
0
        public bool Execute(string[] args)
        {
            if (!Validate(args))
            {
                return(false);
            }

            try
            {
                var access = new JsonLibraryAccess();
                var loader = new LibraryIO(args[0], access, access);
                jukeController.LoadHandler.LoadSongs(loader);
            } catch (Exception e)
            {
                Console.WriteLine(e.Message);
                Console.WriteLine(e.StackTrace);
                return(false);
            }

            Console.WriteLine("");
            Console.WriteLine("JUKE Library stats: ");
            Console.WriteLine("Artists: " + jukeController.Browser.Artists.Count);
            Console.WriteLine("Albums: " + jukeController.Browser.Albums.Count);
            Console.WriteLine("Songs: " + jukeController.Browser.Songs.Count);
            Console.WriteLine("");

            return(true);
        }
コード例 #2
0
        public SongWriter CreateWriter(string filename)
        {
            var access = new JsonLibraryAccess();

            return(new LibraryIO(filename, access, access));
        }