Refactor DocumentService and CutListService to return Result<T>
instead of throwing exceptions or using out parameters. This
removes all MessageBox calls from business logic.
DocumentService changes:
- Load() returns Result<Document> instead of Document
- Save() returns Result instead of void
- Validate() returns Result instead of bool with out parameter
- All exceptions caught and converted to Result.Failure
CutListService changes:
- Pack() returns Result<SawCut.Nesting.Result>
- Exceptions caught and converted to Result.Failure
Benefits:
- Services are now UI-agnostic (no MessageBox)
- Can be unit tested without UI dependencies
- Can be reused in console apps, web apps, etc.
- Errors are values, not exceptions
- Clear, type-safe error handling contract
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>