public bool OptionHasValue()
{
_require(StreamOp.Option);
// get the expected tag for an option of this type
var option = (OptionSchema)_state.Schema;
var expected = Utils.GetExpectedTag(_state.Tag, option.ElementType);
bool hasValue = _reader.AtTag(expected.ContextTag, expected.ApplicationTag);
if(hasValue)
{
_stack.Push(_state);
_state = new SchemaState(option.ElementType, _state.Tag, -1);
}
else
{
_moveNext();
}
return hasValue;
}