fix: improve MemoryStore code quality and error handling
Critical fixes:
- ConvertFromBytes now throws NotSupportedException for unsupported types instead of returning default
- Removed string type handling from generic methods (unreachable with struct constraint)
- Updated to use IsNullOrWhiteSpace instead of IsNullOrEmpty for address validation
Major fixes:
- ParseAddress now wraps FormatException/OverflowException with context
- Import now validates data lengths match region sizes before writing
- Added explicit validation that length is non-zero in ReadBytes
- Added comprehensive XML documentation for all public methods
- Documented GetRegion returns mutable references requiring lifecycle coordination
- Documented Export is expensive and should be used sparingly
- Documented DBRegion auto-creation behavior in Import/Export
Improvements:
- Fixed endianness handling to use big-endian consistently (S7 PLC standard)
- Added support for uint and byte types in conversion methods
- Improved error messages with detailed context
- Enhanced ExportDBRegion to handle missing DB blocks gracefully
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>