예제 #1
0
        public Models.Track ReadFile(String path)
        {
            if (!IsMusicFile(path))
            {
                throw new NotSupportedException($"File extension {Path.GetExtension(path)} is not supported.");
            }

            IFileLoader loader = fileLoaderFactory.GetLoader(Path.GetExtension(path));

            return(loader.FileToString(path));
        }