示例#1
0
文件: TagUtils.cs 项目: MRoc/puremp3
        public static Tag RawToTagV1(byte[] raw)
        {
            Tag tag = new Tag(new TagCodecV1());

            using (Reader reader = new Reader(raw))
            {
                tag.Read(reader);
            }

            return(tag);
        }
示例#2
0
文件: TagUtils.cs 项目: MRoc/puremp3
        public static Tag RawToTagV2(byte[] raw)
        {
            Tag tag = new Tag(new TagCodecV2());

            using (Reader reader = new Reader(raw))
            {
                reader.ThrowExceptions = false;
                tag.Read(reader);
            }

            return(tag);
        }
示例#3
0
文件: TagUtils.cs 项目: MRoc/puremp3
        public static Tag ReadTagV2ThrowExceptions(FileInfo file)
        {
            Tag tag = new Tag(new TagCodecV2());

            using (Reader reader = new Reader(file))
            {
                reader.ThrowExceptions = true;
                tag.Read(reader);
            }

            return(tag);
        }
示例#4
0
文件: TagUtils.cs 项目: MRoc/puremp3
        public static Tag ReadTagV2(FileInfo file)
        {
            Debug.Assert(HasTagV2(file));

            Tag tag = new Tag(new TagCodecV2());

            using (Reader reader = new Reader(file))
            {
                tag.Read(reader);
            }

            return(tag);
        }
示例#5
0
文件: TagUtils.cs 项目: MRoc/puremp3
        public static Tag ReadTagV1(FileInfo file)
        {
            Debug.Assert(HasTagV1(file));

            Tag tag = new Tag(Version.v1_0);

            using (Reader reader = new Reader(file))
            {
                tag.Read(reader);
            }

            return(tag);
        }