static int Read7BitEncodedInt( [NotNull] BinaryReader reader ) {
byte num3;
int num = 0;
int num2 = 0;
do {
if( num2 == 0x23 ) {
throw new SerializationException( "Invalid 7bit encoded integer." );
}
num3 = reader.ReadByte();
num |= (num3 & 0x7f) << num2;
num2 += 7;
}
while( (num3 & 0x80) != 0 );
return num;
}