private void AssertCanReadContents(int expectedInnerNumber)
{
this.AssertNotDisposed();
if (!this.innerNumber.HasValue || (this.innerNumber.Value != expectedInnerNumber))
{
throw new InvalidOperationException("The current data value does not have contents of the requested type.");
}
expectedInnerNumber.Ignore();
if (!this.CanReadContents)
{
throw new InvalidOperationException("The contents of the current data value has already been read.");
}
this.CanReadContents = false;
}