public static Tag RawToTagV1(byte[] raw) { Tag tag = new Tag(new TagCodecV1()); using (Reader reader = new Reader(raw)) { tag.Read(reader); } return(tag); }
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); }
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); }
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); }
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); }