Probably doesn't meet the RTM bar.
Youssef:
About the InvalidOperation vs SerializationException, there are ~20 invalid operations thrown in the formatter namespace (more than the serialization exceptions). For consistency, we should either change them all to invalid operation or change them all to serialization exceptions.
David:
IMO, the case when IOE is correct is if it’s a matter of the object’s current state preventing the operation (rather than a parameter being invalid, in which case SE is better). I think there are some cases where the formatter requires state (like the request); in those cases, I think IOE makes sense. In all other cases, I’d go with SE.
Youssef:
About the InvalidOperation vs SerializationException, there are ~20 invalid operations thrown in the formatter namespace (more than the serialization exceptions). For consistency, we should either change them all to invalid operation or change them all to serialization exceptions.
David:
IMO, the case when IOE is correct is if it’s a matter of the object’s current state preventing the operation (rather than a parameter being invalid, in which case SE is better). I think there are some cases where the formatter requires state (like the request); in those cases, I think IOE makes sense. In all other cases, I’d go with SE.