public override int ReadElementContentAsBinHex( byte[] buffer, int index, int count ) {
if ( readState != ReadState.Interactive ) {
return 0;
}
// init ReadContentAsBinaryHelper when called first time
if ( !bInReadBinary ) {
readBinaryHelper = ReadContentAsBinaryHelper.CreateOrReset( readBinaryHelper, this );
}
// turn off bInReadBinary in order to have a normal Read() behavior when called from readBinaryHelper
bInReadBinary = false;
// call to the helper
int readCount = readBinaryHelper.ReadElementContentAsBinHex( buffer, index, count );
// turn on bInReadBinary in again and return
bInReadBinary = true;
return readCount;
}