public override void Read(BinaryReader reader) { base.Read(reader); byte[] body = reader.ReadBytes(this.HeaderOne - 12); Type = (PhotoDetailType)ToInt16(body, 0); switch (Type) { case PhotoDetailType.ThumbnailContainer: case PhotoDetailType.ImageContainer: ImageName = new ImageNameRecord(IsBE); ImageName.Read(reader); break; case PhotoDetailType.FileName: ReadString(reader, true); break; case PhotoDetailType.String: ReadString(reader, false); break; default: throw new DatabaseReadException("Unknown detail type: " + Type); } }
public PhotoDetailRecord(bool isbe, PhotoDetailType type) : this(isbe, null, type) { }
public PhotoDetailRecord(bool isbe, ImageNameRecord name, PhotoDetailType type) : this(isbe) { Type = PhotoDetailType.ThumbnailContainer; ImageName = name; Type = type; }