Skip to content

Replace ICommandLineInterface with ICli from Platform.Interfaces library#35

Open
konard wants to merge 3 commits into
mainfrom
issue-4-19f87a35
Open

Replace ICommandLineInterface with ICli from Platform.Interfaces library#35
konard wants to merge 3 commits into
mainfrom
issue-4-19f87a35

Conversation

@konard

@konard konard commented Sep 13, 2025

Copy link
Copy Markdown
Member

Summary

This pull request resolves issue #4 by replacing the custom ICommandLineInterface with the standardized ICli interface from the Platform.Interfaces library.

Changes Made

  • Added Platform.Interfaces dependency (version 0.5.0)
  • Updated all CLI classes to implement ICli instead of ICommandLineInterface:
    • XmlImporterCLI.cs
    • XmlExporterCLI.cs
    • XmlElementCounterCLI.cs
  • Changed method signatures from void Run(params string[] args) to int Run(params string[] args) to match the ICli interface
  • Added proper exit codes: Return 0 for success, 1 for error conditions
  • Version bump to 0.0.4 with updated release notes

Technical Details

The Platform.Interfaces library already contains an ICli interface that serves the same purpose as the removed ICommandLineInterface. The key difference is that ICli.Run() returns an integer exit code (following Unix conventions), while the original interface returned void.

All CLI implementations now properly return:

  • 0 on successful execution
  • 1 on error conditions (file not found, invalid arguments, cancellation, etc.)

Test Results

✅ Build succeeds with no compilation errors
✅ All existing functionality preserved
✅ Follows established patterns in the LinksPlatform ecosystem

Fixes #4

🤖 Generated with Claude Code

Adding CLAUDE.md with task information for AI processing.
This file will be removed when the task is complete.

Issue: #4
@konard konard self-assigned this Sep 13, 2025
- Added Platform.Interfaces dependency (version 0.5.0)
- Updated all CLI classes to implement ICli instead of ICommandLineInterface
- Changed Run method signatures to return int (exit code) instead of void
- Added appropriate return values (0 for success, 1 for error conditions)
- Updated version to 0.0.4 and release notes

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@konard konard changed the title [WIP] Move this class to Platform.Interfaces library Replace ICommandLineInterface with ICli from Platform.Interfaces library Sep 13, 2025
@konard konard marked this pull request as ready for review September 13, 2025 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move this class to Platform.Interfaces library

1 participant