public static RestrictionDB read(BinaryReader binaryReader) { RestrictionDB newObj = new RestrictionDB(); newObj.version = binaryReader.ReadUInt32(); newObj._bitmask = binaryReader.ReadUInt32(); newObj._monarch_iid = binaryReader.ReadUInt32(); newObj._buckets = binaryReader.ReadUInt16(); newObj._table_size = binaryReader.ReadUInt16(); newObj._table = new List <RestrictionDBTable>(); for (int i = 0; i < newObj._buckets; i++) { newObj._table.Add(RestrictionDBTable.read(binaryReader)); } return(newObj); }
public static RestrictionDB read(BinaryReader binaryReader) { RestrictionDB newObj = new RestrictionDB(); var startPosition = binaryReader.BaseStream.Position; newObj.version = binaryReader.ReadUInt32(); newObj._bitmask = binaryReader.ReadUInt32(); newObj._monarch_iid = binaryReader.ReadUInt32(); newObj._buckets = binaryReader.ReadUInt16(); newObj._table_size = binaryReader.ReadUInt16(); newObj._table = new List <RestrictionDBTable>(); for (int i = 0; i < newObj._buckets; i++) { newObj._table.Add(RestrictionDBTable.read(binaryReader)); } newObj.Length = (int)(binaryReader.BaseStream.Position - startPosition); return(newObj); }