Example #1
0
 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;
     }
 }
Example #2
0
 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;
     }
 }