public StructureReader(Func <int, byte[]> readBytes) { this.readBytes = readBytes; if (typeof(T).IsDefined(typeof(EndianAttribute), false)) { EndianAttribute attr = (EndianAttribute)(typeof(T).GetCustomAttribute(typeof(EndianAttribute), false)); this.defaultEndianess = attr.Endianness; } }
public StructureReader(ImageReader reader) { this.reader = reader; if (typeof(T).IsDefined(typeof(EndianAttribute), false)) { EndianAttribute attr = (EndianAttribute)(typeof(T).GetCustomAttribute(typeof(EndianAttribute), false)); this.defaultEndianess = attr.Endianness; } }